31 lines
775 B
Plaintext
31 lines
775 B
Plaintext
server {
|
|
listen 80;
|
|
listen 443 ssl;
|
|
server_name gitea.sggai.site;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/gitea.sggai.site/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/gitea.sggai.site/privkey.pem;
|
|
|
|
root /var/www;
|
|
index index.html;
|
|
|
|
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_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
root /var/www;
|
|
default_type text/plain;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
if ($scheme = http) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
proxy_pass http://10.1.0.1:3000;
|
|
}
|
|
}
|