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
11 rewrite ^/index.php/(.*)$ /wiki/$1 permanent;
13 try_files $uri $uri/ =404; # Don't let php execute non-existent php files
14 fastcgi_split_path_info ^(.+\.php)(/.+)$;
15 fastcgi_pass unix:/run/php5/fpm/lhc_wiklou;
16 fastcgi_index index.php ;
17 include /etc/nginx/conf.d/fastcgi.conf;
18 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
23 # Separate location for images/ so .php execution won't apply
24 location ~ ^/images/thumb/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ {
25 # Thumbnail handler for MediaWiki
26 # This location only matches on a thumbnail's url
27 # If the file does not exist we use @thumb to run the thumb.php script
28 try_files $uri $uri/ @thumb;
32 location /images/deleted {
33 # Deny access to deleted images folder
37 # Deny access to folders MediaWiki has a .htaccess deny in
38 location /cache { deny all; }
39 location /languages { deny all; }
40 location /maintenance { deny all; }
41 location /serialized { deny all; }
43 # Just in case, hide .svn and .git too
44 location ~ /.(svn|git)(/|$) { deny all; }
46 # Hide any .htaccess files
47 location ~ /.ht { deny all; }
49 # Uncomment the following code if you wish to hide the installer/updater
50 ## Deny access to the installer
51 #location /mw-config { deny all; }
53 # Handling for the article path
55 include /etc/nginx/conf.d/fastcgi.conf;
56 # article path should always be passed to index.php
57 fastcgi_param SCRIPT_FILENAME $document_root/index.php;
58 fastcgi_split_path_info ^(.+\.php)(/.+)$;
59 fastcgi_pass unix:/run/php5/fpm/lhc_wiklou;
60 fastcgi_index index.php ;
63 # Thumbnail 404 handler, only called by try_files when a thumbnail does not exist
65 # Do a rewrite here so that thumb.php gets the correct arguments
66 rewrite ^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2;
67 rewrite ^/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2&archived=1;
69 # Run the thumb.php script
70 include /etc/nginx/conf.d/fastcgi.conf;
71 fastcgi_param SCRIPT_FILENAME $document_root/thumb.php;
72 fastcgi_pass unix:/run/php5/fpm/lhc_wiklou;
75 location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
76 try_files $uri /index.php;
92 root /var/www/mediawiki/local;