102 lines
3.1 KiB
Plaintext
102 lines
3.1 KiB
Plaintext
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
|
|
root /hosting/rommark.dev/public;
|
|
index index.html;
|
|
|
|
# Proxy PromptArch at /tools/promptarch/
|
|
location /tools/promptarch/ {
|
|
proxy_pass http://172.17.0.1:3005/tools/promptarch/;
|
|
proxy_http_version 1.1;
|
|
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;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 300s;
|
|
proxy_connect_timeout 75s;
|
|
}
|
|
|
|
# Proxy Gitea at /hosting/github/
|
|
location /hosting/github/ {
|
|
proxy_pass http://gitea:3000/;
|
|
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;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_read_timeout 300s;
|
|
proxy_connect_timeout 75s;
|
|
|
|
# Fix sub-path issues
|
|
proxy_cookie_path /hosting/github/ /;
|
|
proxy_redirect http://$host/ http://$host/hosting/github/;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name _;
|
|
|
|
root /hosting/rommark.dev/public;
|
|
index index.html;
|
|
|
|
# Proxy PromptArch at /tools/promptarch/
|
|
location /tools/promptarch/ {
|
|
proxy_pass http://172.17.0.1:3005/tools/promptarch/;
|
|
proxy_http_version 1.1;
|
|
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;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 300s;
|
|
proxy_connect_timeout 75s;
|
|
}
|
|
|
|
# Proxy Gitea at /hosting/github/
|
|
location /hosting/github/ {
|
|
proxy_pass http://gitea:3000/;
|
|
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;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_read_timeout 300s;
|
|
proxy_connect_timeout 75s;
|
|
|
|
# Fix sub-path issues
|
|
proxy_cookie_path /hosting/github/ /;
|
|
proxy_redirect http://$host/ http://$host/hosting/github/;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
ssl_certificate /etc/letsencrypt/live/rommark.dev/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/rommark.dev/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
ssl_prefer_server_ciphers on;
|
|
}
|