Hi, to reverse proxy using Webinoly, SSL, and Docker, you'll first need to create a site. For some reason, site domain.tld -proxy=[localhost:3000] doesn't work, it will give an error: no matches found: --proxy=[localhost:3000].
# Upstreams
upstream domain.tld {
# Change to whatever port you set in the docker container or docker-compose.yml
server 127.0.0.1:3000;
}
# WebinolySSLredirectStart - HTTP to HTTPS Redirect
server {
listen 80;
listen [::]:80;
server_name domain.tld www.domain.tld;
return 301 https://$host$request_uri;
}
# WebinolySSLredirectEnd
# WebinolyNginxServerStart
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name domain.tld www.domain.tld;
# WebinolySSLstart
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/letsencrypt/live/domain.tld/chain.pem;
# WebinolySSLend
access_log /var/log/nginx/domain.tld.access.log we_log;
error_log /var/log/nginx/domain.tld.error.log;
#root /var/www/domain.tld/htdocs;
#index index.html index.htm;
#location / { try_files $uri $uri/ =404; }
#include common/locations.conf;
include common/headers-http.conf;
include common/headers-https.conf;
#include common/headers-html.conf;
include /var/www/domain.tld/*-nginx.conf;
location / {
proxy_pass http://domain.tld/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
}
}
# WebinolyNginxServerEnd