Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream backend { server unix:/var/run/php5-fpm.sock; }
- upstream memcached { server 127.0.0.1:11211; }
- server
- {
- listen 8080;
- server_name www.cs-amx.fr;
- rewrite ^ http://cs-amx.fr$request_uri? permanent;
- }
- server
- {
- listen 8080;
- server_name cs-amx.fr;
- root /srv/d_cs-amx/www/cs-amx.fr/htdocs;
- index index.html index.htm index.php;
- charset utf-8;
- add_header "X-UA-Compatible" "IE=Edge,chrome=1";
- add_header "Access-Control-Allow-Origin" "*";
- location = /robots.txt { allow all; log_not_found off; access_log off; }
- location = /favicon.ico { log_not_found off; access_log off; }
- location ~* (^|/)\. { deny all; }
- location ~ /(internal_data|library)
- {
- internal;
- }
- #error_page 404 = @rewrite;
- location /
- {
- try_files $uri $uri/ /index.php?$uri&$args;
- #expires 30d;
- }
- location ~ ^/(attachments|albums|qus)/(.*)$
- {
- rewrite ^/(.*)$ /index.php?$1&$args last;
- #try_files /index.php?attachments/do-upload\.json?$args /index.php?$uri&$args;
- }
- location ~* (\.|-)(?:jpg|jpeg|gif|png|ico|gz|svg|svgz|mp4|ogg|ogv|webm|css|js|ttf|ttc|otf|eot|woff|ico)(.*)?$
- {
- expires max;
- access_log off;
- add_header Cache-Control "public";
- }
- location ~ \css.php$
- {
- expires max;
- access_log off;
- add_header Cache-Control "public";
- }
- location ~ \.php$
- {
- try_files $uri /index.php;
- fastcgi_pass backend;
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
- include fastcgi_params;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement