summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2019-01-06 00:51:48 -0300
committerYaco <franco@reevo.org>2019-01-06 00:51:48 -0300
commitcfad296283b289746d31d5a0ab0d25f76f53fabe (patch)
treef68d52ed619223739a272ca3ee8b2b2cec72bc58 /etc
parent9795a63c121e5c31530f6a4ca54117d64ec1797d (diff)
corrige sample de nginx
Diffstat (limited to 'etc')
-rwxr-xr-xetc/nginx/wiki.conf.sample53
1 files changed, 10 insertions, 43 deletions
diff --git a/etc/nginx/wiki.conf.sample b/etc/nginx/wiki.conf.sample
index fbb036fa..fab5e545 100755
--- a/etc/nginx/wiki.conf.sample
+++ b/etc/nginx/wiki.conf.sample
@@ -14,61 +14,28 @@ server {
access_log /srv/reevo-2020/log/wiki/nginx.access.log;
error_log /srv/reevo-2020/log/wiki/nginx.error.log;
- if ($request_method !~ ^(GET|HEAD|POST)$) {
- return 405;
+ location / {
+ index index.php;
+ try_files $uri $uri/ @mediawiki;
}
- # Force static locations
location = /favicon.ico {
- expires +1y;
- }
-
- # Forbid access to files starting with .
- location ~ /\. {
- access_log off;
- log_not_found off;
- deny all;
- }
-
- # Prevent access to internal URIs
- location ^~ /(bin|docs|extensions|includes|maintenance|resources|serialized|tests)/ {
- internal;
- }
-
- ## Uncomment after install
- # location ^~ /mw-config/ { internal; }
-
- # Prevent non-images in /images
- location ~* /images/.*\.[^\\/:*?\x22<>|%]+(#|\?|$) {
- types { }
- default_type text/plain;
+ add_header Cache-Control "public";
+ expires 7d;
}
- location / {
- # Sitio offline
- if ($maintenance) { return 503; }
-
- # Bloquea bots
- if ($limit_bots) { add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; }
-
- try_files $uri $uri/ =404;
- error_page 404 = @mediawiki;
- error_page 503 = @maintenance;
- }
-
- location @maintenance {
- # Sitio offline
- rewrite ^(.*)$ /errors/503/index.html break;
+ location = /robots.txt {
}
location @mediawiki {
- rewrite ^/(.*)$ /index.php?title=$1&$args last;
+ rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
}
- location ~ \.php$ {
- fastcgi_pass unix:/srv/reevo-2020/run/wiki.socket;
+ location ~ \.php?$ {
include /etc/nginx/fastcgi_params;
+ fastcgi_pass unix:/srv/reevo-2020/run/wiki.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
+
}