36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name git.woyue.org;
|
|
server_tokens off;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name git.woyue.org;
|
|
server_tokens off;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/git.woyue.org/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/git.woyue.org/privkey.pem;
|
|
#include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
location / {
|
|
#ip address below should changed accordingly.
|
|
proxy_pass http://172.20.0.15:3000;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
}
|
|
}
|