Files
nginx_sites/fachschaften.at/crawler.conf
2017-07-23 09:58:08 +02:00

61 lines
1.4 KiB
Nginx Configuration File

# -*-nginx-*-
server{
listen 80;
server_name www.crawler.fachschaften.at crawler.fachschaften.at;
root /srv/pxy/fachschaften;
# Location .well known is required for certificate renewal
location /.well-known {
allow all;
}
# Force SSL
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name www.crawler.fachschaften.at crawler.fachschaften.at;
ssl_certificate /etc/letsencrypt/live/www.fachschaften.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.fachschaften.at/privkey.pem;
root /srv/pxy/fachschaften;
location /.well-known {
allow all;
}
location /sections {
auth_basic " under construction ";
auth_basic_user_file /srv/fachschaften_htpasswd;
try_files $uri @crawler;
}
location /articles {
satisfy any;
auth_basic " under construction ";
auth_basic_user_file /srv/fachschaften_htpasswd;
deny all;
allow 192.168.95.0/24;
try_files $uri @crawler;
}
location /downloads {
try_files $uri @crawler;
}
location @crawler {
proxy_pass http://fachschaften:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
# error_page 503 404 410 /404.html;
# access_log /var/log/crawler/nginxaccess.log;
# error_log /var/log/crawler/nginxerror.log;