Skip to content

Cannot switch to 443 from 8443 #47

@bellfeige

Description

@bellfeige

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions