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

Cannot switch to 443 from 8443 #47

Open
bellfeige opened this issue Feb 9, 2023 · 0 comments
Open

Cannot switch to 443 from 8443 #47

bellfeige opened this issue Feb 9, 2023 · 0 comments

Comments

@bellfeige
Copy link

bellfeige commented Feb 9, 2023

After changed the port to 443 in nginx/default.conf and docker-compose.yml, https://127.0.0.1 become not unreachable and http://127.0.0.1 still redirect to https://127.0.0.1:8443. Why is that?
Anywhere else I missed updating?

server {
    listen 80;
    listen [::]:80;
    server_name $host;
    location / {
        # update port as needed for host mapped https
        rewrite ^ https://127.0.0.1:443$request_uri? permanent;
    }
}
  nginx:
    # default ports 80, 443 - expose mapping as needed to host
    image: nginx:1
    container_name: wp-nginx
    env_file:
      - .env
    restart: unless-stopped
    networks:
      - wordpress
    depends_on:
      - wordpress
    ports:
      - "80:80"    # http
      - "443:443"   # https
    volumes:
      - ${WORDPRESS_LOCAL_HOME}:/var/www/html
      - ${NGINX_CONF}:/etc/nginx/conf.d/default.conf
      - ${NGINX_SSL_CERTS}:/etc/ssl:ro
      - ${NGINX_LOGS}:/var/log/nginx
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