Anthony Wang
f9748b3ec7
The first change doesn't require any manual intervention since /srv/http/pages is now symlinked to /srv/http. The purpose of it is just to make paths shorter, that's all. I have several reasons for the second change, even though it may have been a useful feature: - Security: Some programs use those ports by default and you don't want to accidentally expose them to the internet. If you want to run a program on exozyme and view it on your own computer, use SSH port forwarding instead. - There was some weird DNS resolution problem with that config so I made it only listen to IPv4, which can cause problems since some programs only bind to IPv6. - If you want to expose a program to the internet, you must use a Unix socket or socat. This feature was useful as a quick-and-dirty option, but socat is also just one command and doesn't require much more effort.
16 lines
534 B
Text
16 lines
534 B
Text
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name karawale.in *.karawale.in;
|
|
|
|
ssl_certificate /home/pranav/.local/share/cert/karawale.in/fullchain.pem;
|
|
ssl_certificate_key /home/pranav/.local/share/cert/karawale.in/key.pem;
|
|
|
|
location / {
|
|
proxy_pass http://unix:/srv/http/pranav;
|
|
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;
|
|
}
|
|
}
|