Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HowTo Add HTTPS redirect for Perseus? #65

Open
sudoshi opened this issue Dec 24, 2023 · 0 comments
Open

HowTo Add HTTPS redirect for Perseus? #65

sudoshi opened this issue Dec 24, 2023 · 0 comments

Comments

@sudoshi
Copy link

sudoshi commented Dec 24, 2023

Here is my amended nginx server.docker.conf:

server {

        listen       88;
        listen  [::]:88;
        server_name  sandbox.acumenus.net;

        location /.well-known/acme-challenge/ {
                root /verify;
                default_type "text/plain";
        }

        location = /.well-known/acme-challenge/ {
                return 404;
		}

		# Redirect all other requests to HTTPS
		location / {
			return 301 https://$host:2443$request_uri;
		}
}
		
server {

        listen 2443 ssl;
        server_name  sandbox.acumenus.net;

        ssl_protocols           TLSv1.2 TLSv1.3;
		ssl_certificate /etc/letsencrypt/archive/sandbox.acumenus.net/fullchain2.pem; # path to your fullchain.pem
		ssl_certificate_key /etc/letsencrypt/archive/sandbox.acumenus.net/privkey2.pem; # path to your privkey.pem
		ssl_session_timeout     10m;

    location / {
		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            Host $host;
		proxy_pass                  http://172.17.0.1:4200;
		# proxy_pass                  http://host.docker.internal:4200;

	}

Connects insecure on port 88
Connection refused on port 2443

Any ideas what I might be doing wrong here? Any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant