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

PrestaShop in Docker redirects to localhost:8080 instead of configured domain #395

Open
sepiropht opened this issue Aug 30, 2024 · 0 comments

Comments

@sepiropht
Copy link

Description

I'm experiencing an issue where my PrestaShop setup redirects the domain to localhost:8080 when i use browser instead of the actual domain set for my shop.

Steps to Reproduce

Use ubuntu 22.04

  1. Set up PrestaShop in a Docker container.
  2. Use Caddy as the web server.
  3. Access https://shop.mydomain.com.

Expected Behavior

The shop should open correctly without redirecting to localhost:8080.

Actual Behavior

The shop redirects to localhost:8080, causing a failed page load.

My Caddyfile

shop.mydomain.com {
  reverse_proxy localhost:8080
}

I use the docker compose file from the doc

version: '3'

services:
  mariadb:
    container_name: prestashop-db
    image: mariadb:10.5
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: admin
      MYSQL_DATABASE: prestashop
    volumes:
      - ./mariadb_data:/var/lib/mysql
      - ./my.cnf:/etc/mysql/my.cnf
    networks:
      - prestashop_network
    deploy:
      resources:
        limits:
          memory: 1G

  prestashop:
    container_name: prestashop
    image: prestashop/prestashop:latest
    restart: unless-stopped
    depends_on:
      - mariadb
    ports:
      - "8080:80"
    environment:
      DB_SERVER: prestashop-db
      DB_NAME: prestashop
      DB_USER: root
      DB_PASSWD: admin
      PS_INSTALL_AUTO: 1
      ## there i  also tried my own domain but doesnt' work too but. The doc seems to recommand localhost:8080
      PS_DOMAIN: localhost:8080
    volumes:
      - ./prestashop_data:/var/www/html
    networks:
      - prestashop_network

networks:
  prestashop_network:
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