Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# example nginx conf file that handels reverse proxy
# and enables https

# place file in sites-available


server {
listen 80;
listen [::]:80;
server_name mydomain.tld;
return 301 https://mydomain.tld$request_uri;
}


server {
listen 443 ssl;
listen [::]:443 ssl;
# uses certificates from certbot
ssl_certificate /etc/letsencrypt/live/mydomain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomain.tld/privkey.pem;


# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;

server_name mydomain.tld;

location / {
# only if you need a basic auth
# auth_basic "Administrator’s Area";
# auth_basic_user_file /etc/nginx/.splitterpass;
proxy_pass http://mydomain.tld:9000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_http_version 1.1;
}
}