linux/conf/nginx/sites-available/example
Adrian c58105e816 Update Nginx config
* Make only Let's Encrypt path available on port 80
* Protect WordPress admin URLs
* Seperate logs for hosts
* Update example PHP config
* Update README
2016-03-17 01:52:10 +01:00

39 lines
695 B
Text

server {
server_name test.example.com;
listen 443 ssl;
root /usr/share/nginx/html;
index index.php index.html index.htm;
access_log /data/log/nginx/test-access.log;
error_log /data/log/nginx/test-error.log;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
# PHP processing
location ~ \.php$ {
fastcgi_pass unix:/run/php5-fpm.sock;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
include inc/restrict-wp-access;
# AWstats
location /awstats {
alias /usr/local/awstats/wwwroot/cgi-bin;
access_log off;
include inc/cgi-bin;
include inc/allow-local;
}
location /awstatsicons {
alias /usr/local/awstats/wwwroot/icon;
access_log off;
}
}