42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
|
|
server {
|
|
|
|
root /var/www/html;
|
|
|
|
# Add index.php to the list if you are using PHP
|
|
index index.html index.htm index.nginx-debian.html;
|
|
server_name channel.twilightparadox.com; # managed by Certbot
|
|
|
|
listen [::]:443 ssl ipv6only=on; # managed by Certbot
|
|
listen 443 ssl; # managed by Certbot
|
|
ssl_certificate /etc/letsencrypt/live/channel.twilightparadox.com/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/channel.twilightparadox.com/privkey.pem; # managed by Certbot
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
location /git/ {
|
|
rewrite ^ $request_uri;
|
|
rewrite ^/git(/.*) $1 break;
|
|
proxy_pass http://127.0.0.1:8080$uri;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
|
|
}
|
|
server {
|
|
if ($host = channel.twilightparadox.com) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
listen 80 ;
|
|
listen [::]:80 ;
|
|
server_name channel.twilightparadox.com;
|
|
return 404; # managed by Certbot
|
|
|
|
|
|
}
|