57 lines
1.3 KiB
Nginx Configuration File
57 lines
1.3 KiB
Nginx Configuration File
# nginx reverse proxy for nextthelounge
|
|
|
|
server {
|
|
server_name thelounge.s1gm4.eu;
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
# Redirect to https
|
|
location / {
|
|
redirect 302 https://$server_name$request_uri;
|
|
}
|
|
|
|
# For dehydrated ssl certification
|
|
location /.well-known/acme-challenge {
|
|
alias /var/www/dehydrated/acme-challenges;
|
|
}
|
|
}
|
|
|
|
server {
|
|
# SSL configuration
|
|
#
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
#
|
|
|
|
ssl_certificate /var/www/dehydrated/certs/thelounge.s1gm4.eu/fullchain.pem;
|
|
ssl_certificate_key /var/www/dehydrated/certs/thelounge.s1gm4.eu/privkey.pem;
|
|
|
|
# Add index.php to the list if you are using PHP
|
|
index index.html index.htm index.php;
|
|
|
|
server_name thelounge.s1gm4.eu;
|
|
|
|
# deny access to .htaccess files, if Apache's document root
|
|
# concurs with nginx's one
|
|
#
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
# For dehydrated ssl certification
|
|
location /.well-known/acme-challenge {
|
|
alias /var/www/dehydrated/acme-challenges;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://localhost:9000/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# by default nginx times out connections in one minute
|
|
proxy_read_timeout 1d;
|
|
}
|
|
|
|
} |