2 wiklou.heureux-cyclage.org
6 client_body_buffer_size 8k;
7 client_max_body_size 10m;
10 # Do this inside of a location so it can be negated
12 try_files $uri $uri/ =404; # Don't let php execute non-existent php files
13 rewrite ^/index.php/(.*)$ /wiki/$1 permanent;
14 fastcgi_split_path_info ^(.+\.php)(/.+)$;
15 fastcgi_pass unix:/run/php5/fpm/lhc_wiklou;
16 fastcgi_index index.php ;
17 fastcgi_buffers 16 16k;
18 fastcgi_buffer_size 32k;
19 include fastcgi_params;
20 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
25 # Separate location for images/ so .php execution won't apply
26 location ~ ^/images/thumb/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ {
27 # Thumbnail handler for MediaWiki
28 # This location only matches on a thumbnail's url
29 # If the file does not exist we use @thumb to run the thumb.php script
30 try_files $uri $uri/ @thumb;
34 location /images/deleted {
35 # Deny access to deleted images folder
39 # Deny access to folders MediaWiki has a .htaccess deny in
40 location /cache { deny all; }
41 location /languages { deny all; }
42 location /maintenance { deny all; }
43 location /serialized { deny all; }
45 # Just in case, hide .svn and .git too
46 location ~ /.(svn|git)(/|$) { deny all; }
48 # Hide any .htaccess files
49 location ~ /.ht { deny all; }
51 # Uncomment the following code if you wish to hide the installer/updater
52 ## Deny access to the installer
53 #location /mw-config { deny all; }
55 # Handling for the article path
57 include /etc/nginx/fastcgi_params;
58 # article path should always be passed to index.php
59 fastcgi_param SCRIPT_FILENAME $document_root/index.php;
60 fastcgi_split_path_info ^(.+\.php)(/.+)$;
61 fastcgi_pass unix:/run/php5/fpm/lhc_wiklou;
62 fastcgi_index index.php ;
63 fastcgi_buffers 16 16k;
64 fastcgi_buffer_size 32k;
65 include fastcgi_params;
68 # Thumbnail 404 handler, only called by try_files when a thumbnail does not exist
70 # Do a rewrite here so that thumb.php gets the correct arguments
71 rewrite ^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2;
72 rewrite ^/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2&archived=1;
74 # Run the thumb.php script
75 include /etc/nginx/fastcgi_params;
76 fastcgi_param SCRIPT_FILENAME $document_root/thumb.php;
77 fastcgi_pass unix:/run/php5/fpm/lhc_wiklou;
80 location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
81 try_files $uri /index.php;
97 root /var/www/mediawiki/local;