42 lines
1001 B
Plaintext
42 lines
1001 B
Plaintext
server {
|
|
listen [::]:80;
|
|
listen *:80;
|
|
|
|
server_name gitea.planet-casio.com git.planet-casio.com;
|
|
|
|
include common.conf;
|
|
|
|
access_log /var/log/nginx/gitea_access.log;
|
|
error_log /var/log/nginx/gitea_error.log;
|
|
|
|
location / {
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen [::]:443 ssl http2;
|
|
listen *:443 ssl http2;
|
|
|
|
server_name gitea.planet-casio.com git.planet-casio.com;
|
|
|
|
include common.conf;
|
|
include ssl.conf;
|
|
|
|
ssl_certificate /etc/dehydrated/certs/gitea.planet-casio.com/fullchain.pem;
|
|
ssl_certificate_key /etc/dehydrated/certs/gitea.planet-casio.com/privkey.pem;
|
|
|
|
access_log /var/log/nginx/gitea_access.log;
|
|
error_log /var/log/nginx/gitea_error.log;
|
|
|
|
if ($http_host != "gitea.planet-casio.com") {
|
|
rewrite ^ https://gitea.planet-casio.com$request_uri permanent;
|
|
}
|
|
|
|
location / {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_pass http://127.0.0.1:{{ proxy_ports.gitea | mandatory }};
|
|
}
|
|
}
|