Editing
Installation Guide
(section)
From Vichan Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Configuring the Web server == Vichan does not require much of a modified configuration to work. If you are on the fence on which server to use, Nginx is more commonly used and is notably faster on larger websites. Apache, on the other hand, works more "out of the box" and may be easier to understand if less experienced with running a server. Both servers work well with vichan. If you're using constrained hardware, Lighttpd is a third software that is tailored towards light resource usage. ===Apache=== After installing apache, a simple config like this will work well. This should be located within your /etc/apache2/sites-available directory (this is in /etc/httpd/sites-available for centos or fedora): <pre> <VirtualHost *:80> ServerName example.com ServerAlias www.example.com # Optional <Directory /var/www/YourVichanFolder> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory> ServerAdmin webmaster@localhost DocumentRoot /var/www/YourVichanFolder ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ErrorDocument 403 /static/403.html ErrorDocument 404 /static/404.html </VirtualHost> </pre> The following site config disables directory listing. Then utilize <code>a2ensite yoursiteconfig</code> and reload apache to start your website. ===Nginx=== A nginx config similar to the following will work for vichan. Make sure that php-fpm is installed (<code>apt-get install php-fpm</code> or <code>dnf install php-fpm</code>). <pre> server { server_name example.com www.example.com; root /var/www/YourVichanFolder; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; # Replace with the version of php you are running. } error_page 403 /static/403.html; error_page 404 /static/404.html; } </pre> You may also want to edit either the above config or nginx.conf (within the server or http block respectively) to add the following line, which will allow files larger than 1mb. <code>client_max_body_size 100M; #100 megabytes</code> === Lighttpd === <syntaxhighlight> server.modules += ("mod_fastcgi") static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi") # If using a TCP port: fastcgi.server = ( ".php" => ( "localhost" => ( "host" => "127.0.0.1", "port" => "9000" ) ) ) # If using a Unix socket: fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket", "bin-path" => "/usr/bin/php-cgi" ) ) ) server.document-root = var.basedir + "/path/to/vichan" index-file.names = ("index.php", "index.html", "index.htm", "default.htm") </syntaxhighlight>
Summary:
Please note that all contributions to Vichan Wiki are considered to be released under the Creative Commons Attribution (see
Vichan Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
Edit source
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information