Difference between revisions of "Mediawiki Nginx Config"
Jump to navigation
Jump to search
Adam.birds (talk | contribs) (Created page with "<pre> upstream examplecombackend { server unix:/var/run/php-fcgi-examplecom.sock; } server { listen 80; server_name example.com;...") |
Adam.birds (talk | contribs) |
||
Line 56: | Line 56: | ||
</pre> | </pre> | ||
+ | [[Category:MediaWiki]] | ||
[[Category:Nginx]] | [[Category:Nginx]] | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:Contents]] | [[Category:Contents]] |
Latest revision as of 13:50, 30 April 2016
upstream examplecombackend { server unix:/var/run/php-fcgi-examplecom.sock; } server { listen 80; server_name example.com; root /var/www/vhosts/example.com/htdocs; index index.php; access_log /var/www/vhosts/example.com/wiki-access.log; error_log /var/www/vhosts/example.com/wiki-error.log warn; location / { try_files $uri $uri/ @handler; index index.php index.html; } # location /app/ { deny all; } # location /includes/ { deny all; } # location /lib/ { deny all; } # location /media/downloadable/ { deny all; } # location /pkginfo/ { deny all; } # location /report/config.xml/ { deny all; } # location /images/ { deny all; } # location /var/ { deny all; } # # location /download/ { allow 46.37.189.40; deny all; } location /. { return 404; } location @handler { rewrite ^/(.*)$ /index.php; } # location ~ \.zip$ { # deny all; # } location ~ \.php$ { fastcgi_intercept_errors on; fastcgi_pass examplecombackend; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { # expires max; # log_not_found off; # } }