2015-05-16 01:41:09 +02:00
|
|
|
server {
|
2016-03-17 00:41:34 +01:00
|
|
|
server_name test.example.com;
|
2015-10-03 15:37:18 +02:00
|
|
|
|
2016-01-25 17:45:35 +01:00
|
|
|
listen 443 ssl;
|
2015-05-16 01:41:09 +02:00
|
|
|
|
|
|
|
root /usr/share/nginx/html;
|
2016-03-17 00:41:34 +01:00
|
|
|
index index.php index.html index.htm;
|
2015-05-16 01:41:09 +02:00
|
|
|
|
2016-03-17 00:41:34 +01:00
|
|
|
access_log /data/log/nginx/test-access.log;
|
|
|
|
error_log /data/log/nginx/test-error.log;
|
2015-12-14 01:13:19 +01:00
|
|
|
|
2016-03-17 00:41:34 +01:00
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ /index.php$is_args$args;
|
|
|
|
}
|
2015-12-14 01:13:19 +01:00
|
|
|
|
|
|
|
# PHP processing
|
2015-05-16 01:41:09 +02:00
|
|
|
|
|
|
|
location ~ \.php$ {
|
2015-12-14 01:13:19 +01:00
|
|
|
fastcgi_pass unix:/run/php5-fpm.sock;
|
2015-10-26 17:06:27 +01:00
|
|
|
include fastcgi.conf;
|
2015-05-16 01:41:09 +02:00
|
|
|
fastcgi_intercept_errors on;
|
|
|
|
}
|
2015-12-14 01:13:19 +01:00
|
|
|
|
2016-03-17 00:41:34 +01:00
|
|
|
include inc/restrict-wp-access;
|
|
|
|
|
2015-12-14 01:13:19 +01:00
|
|
|
# AWstats
|
|
|
|
|
|
|
|
location /awstats {
|
|
|
|
alias /usr/local/awstats/wwwroot/cgi-bin;
|
|
|
|
access_log off;
|
|
|
|
include inc/cgi-bin;
|
2016-03-17 00:41:34 +01:00
|
|
|
include inc/allow-local;
|
2015-12-14 01:13:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
location /awstatsicons {
|
|
|
|
alias /usr/local/awstats/wwwroot/icon;
|
|
|
|
access_log off;
|
|
|
|
}
|
2015-05-16 01:41:09 +02:00
|
|
|
}
|