Friendly URL not working on nginx and prestashop

I have a prestashop site, I’ll like to enable the media servers so the images are served from another server.
The main server is apache which have friendly URLs enabled (works fine), also I have installed on the same machine nginx which will take care of images (pointing to the same file system directory as the apache). The server configuration itself for both servers is complete and working fine, the only issue is that the nginx server gives 404 error (page not found) when friendly URLs are enabled.
The nginx config is:

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

    location / {
        proxy_pass http://127.0.0.1:8000;
        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;
    }
}

server {
    listen 80;
    server_name images.myserver.com;

    location / {
        root   /var/www/html/myserver.com;
        index  index.html index.htm;
    }
}

Any ideas?

Thanks


Source: apache

Leave a Reply