2013-10-09 16:07:09 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
2013-10-22 06:16:02 +00:00
|
|
|
listen [::]:80 ipv6only=on;
|
2013-10-09 16:07:09 +00:00
|
|
|
server_name fic fic.p0m.fr fic.nemunai.re;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/fic.access_log;
|
|
|
|
error_log /var/log/nginx/fic.error_log debug;
|
|
|
|
|
|
|
|
root /var/www/fic2014-server/htdocs;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
if (-f $request_filename) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (-d $request_filename) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /index.php?p=$1 last;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* \favicon.ico$ {
|
|
|
|
access_log off;
|
|
|
|
expires 1d;
|
|
|
|
add_header Cache-Control public;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ ^/(img|cjs|ccss)/ {
|
|
|
|
access_log off;
|
|
|
|
expires 7d;
|
|
|
|
add_header Cache-Control public;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ /(\.ht|\.git|\.svn|\.onyx) {
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ .*.php$
|
|
|
|
{
|
|
|
|
if (!-e $document_root$document_uri) { return 404; }
|
|
|
|
include /etc/nginx/fastcgi.conf;
|
|
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|