Jump to content

Edit History

WoozyFace

WoozyFace

Hi all,

I’m trying to set up PrestaShop 8.x behind a reverse proxy using Nginx, and after days of configuration and troubleshooting, I’m still hitting a wall.

⚙️ Setup Overview:

Frontend (Proxy Host):

Debian 12 (Virtualmin-based Nginx setup)

Handles domain ***.com

SSL termination done here

Forwards to internal backend server (via LAN)

Backend (App Host):

Debian 12 bare metal

Nginx + PHP 8.2-FPM

PrestaShop extracted in /var/www/easycomp.shop

install/index.php is present and accessible via curl

MariaDB on a separate host (working and accessible)

Issue:

When I visit https://***.com/install/index.php or even the root https://***.com, I receive:

A 404 Not Found

Even though curl http://localhost/install/index.php on the backend returns 200 OK

The proxy setup seems to strip or misroute the /install/ path

🔎 What I’ve Verified:

File exists and has correct permissions (www-data)

PrestaShop dependencies installed

PHP extensions (SimpleXML, Zip, etc.) are enabled

Nginx config passes syntax check (nginx -t)

No Apache involved, only NGINX on both servers

DNS/proxy resolves correctly to the backend

Direct access to backend IP from LAN works

🚧 Current Reverse Proxy Block (Simplified):

 

server { listen 443 ssl; server_name ***.com www.***.com; ssl_certificate /etc/ssl/virtualmin/ssl.combined; ssl_certificate_key /etc/ssl/virtualmin/ssl.key; location / { proxy_pass http://192.168.1.243; proxy_http_version 1.1; proxy_set_header Host $host; 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; } }

My Main Question:

What is missing or misconfigured that prevents PrestaShop 8’s installer from loading through this reverse proxy setup?

It works directly from the backend, but refuses via the domain.
Do I need to expose additional rewrite rules in the proxy? Is something in Nginx caching a bad route? Is the path /install/index.php being dropped by the proxy or mangled?

I’d love any working Nginx reverse proxy examples (especially with PrestaShop 8), or suggestions for what else I can check to get the installer running.

Thanks in advance!

— WoozyFace (slightly less woozy than before)

WoozyFace

WoozyFace

Subject: 404 Not Found on “Next” Step During PrestaShop Installation (Nginx & Docker)

Part 1: Nginx-Based Installation

I’m installing PrestaShop 8.x on a dedicated Debian 12 (“Bookworm”) server with Nginx and PHP 8.2-FPM. I can complete the initial form (database credentials, shop info), but when I click Next, the installer issues a GET to:

http://***.com/install-dev/index.php

and immediately returns 404 Not Found.

Environment (Nginx)

OS: Debian 12 “Bookworm”

Web Server: Nginx 1.22 (listening on port 80)

PHP-FPM: 8.2 (socket /run/php/php8.2-fpm.sock)

Document Root: /var/www/html/prestashop

Installer Folder: /install-dev/

Key Nginx vhost snippet

server {
    listen 80;
    server_name ***.com www.***.com;

    root /var/www/html/prestashop;
    index index.php;

    # Serve installer directory before other rewrites
    location ^~ /install-dev/ {
        try_files $uri $uri/ /install-dev/index.php?$args;
    }

    # Main PrestaShop front-end
    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    # PHP-FPM handling
    location ~ [^/]\.php(/|$) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        try_files $fastcgi_script_name =404;
        include snippets/fastcgi-php.conf;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    }
}

What I’ve checked so far:

Clean reinstall of Nginx + PHP 8.2-FPM; default vhost works.

Composer dependencies installed (composer install --no-dev -o).

File ownership www-data:www-data (dirs 755, files 644).

Cache cleared (rm -rf var/cache/*), services reloaded.

Nginx error log only shows the 404 for /install-dev/index.php.

Part 2: Docker-Based Installation

To isolate host config, I spun up PrestaShop in Docker (host 8080 → container 80). The initial form loads fine at:

http://***.com:8080/install-dev/

but clicking Next still issues GET /install-dev/index.php and returns 404.

Docker Compose excerpt

version: '3.8'
services:
  db:
    image: mariadb:10.6
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: exampleRootPass
      MYSQL_DATABASE: prestashop
      MYSQL_USER:    psuser
      MYSQL_PASSWORD: pspassword

  prestashop:
    image: prestashop/prestashop:latest
    restart: always
    ports:
      - "8080:80"
    environment:
      DB_SERVER:      db
      PS_INSTALL_AUTO: "0"
      PS_DOMAIN:      ***.com
      PS_DB_USER:     psuser
      PS_DB_PASSWORD: pspassword
      PS_DB_NAME:     prestashop
    volumes:
      - prestashop_data:/var/www/html

volumes:
  prestashop_data:
  db_data:

What I’ve checked in Docker:

Containers are running (docker compose ps).

Permissions inside prestashop_data correct for www-data.

Initial form loads at http://***.com:8080/install-dev/.

Next still triggers GET /install-dev/index.php → 404.

No errors in docker compose logs prestashop.

Questions:

Is there a missing rewrite or redirect in PrestaShop’s installer causing /install-dev/index.php to be unreachable?

Could my Nginx location blocks or Docker volume mappings be stripping out or renaming that file?

What further debugging steps or config tweaks can reveal why the installer cannot find /install-dev/index.php in both setups?

Any insights or suggestions would be greatly appreciated—thanks in advance!

×
×
  • Create New...