2013-12-11 16:20:26 +00:00
|
|
|
access_log /var/log/nginx/fic.access_log;
|
|
|
|
error_log /var/log/nginx/fic.error_log;
|
|
|
|
|
2014-11-05 16:46:18 +00:00
|
|
|
root /var/www/fic-server/htdocs;
|
2013-12-11 16:20:26 +00:00
|
|
|
index index.php;
|
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=2592000; includeSubdomains";
|
2014-11-10 16:21:29 +00:00
|
|
|
add_header X-Frame-Options DENY;
|
|
|
|
add_header X-Content-Type-Options nosniff;
|
2013-12-11 16:20:26 +00:00
|
|
|
|
|
|
|
location / {
|
|
|
|
if (-f $request_filename) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (-d $request_filename) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /index.php?p=$1 last;
|
|
|
|
}
|
|
|
|
|
2013-12-13 17:45:25 +00:00
|
|
|
location /files
|
|
|
|
{
|
2014-11-05 16:46:18 +00:00
|
|
|
root /var/www/fic-server/;
|
2013-12-13 17:45:25 +00:00
|
|
|
}
|
|
|
|
|
2013-12-11 16:20:26 +00:00
|
|
|
location ~* \favicon.ico$ {
|
|
|
|
access_log off;
|
|
|
|
expires 1d;
|
|
|
|
add_header Cache-Control public;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ ^/(img|js|css)/ {
|
|
|
|
access_log off;
|
|
|
|
expires 7d;
|
|
|
|
add_header Cache-Control public;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ /(\.ht|\.git|\.svn|\.onyx) {
|
|
|
|
return 403;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ .*.php$
|
|
|
|
{
|
|
|
|
if (!-e $document_root$document_uri) { return 404; }
|
2014-08-27 10:25:23 +00:00
|
|
|
include /etc/nginx/fastcgi_params;
|
2013-12-13 17:45:25 +00:00
|
|
|
fastcgi_pass unix:/var/run/php-fpm.sock;
|
2013-12-11 16:20:26 +00:00
|
|
|
fastcgi_index index.php;
|
|
|
|
break;
|
|
|
|
}
|