Jump to content

Nginx as Reverse Proxy for Prestashop


Giovannio

Recommended Posts

Hello Dear,

I have this scenario with Nginx as reverse proxy and Prestashop:

I have Prestashop installed as a container with Proxmox and it has been configured with a local IP address (192.168.0.10) instead of a domain name. I can access Prestashop via the local IP without problems through the local network.

I have nginx as a reverse proxy installed on another VM that receives the request with a domain name (subdomain.example.com) with an SSL certificate on the Nginx, and makes a proxy_pass for the local IP address (192.168.0.10).

When the request is made via the external domain Prestashop redirects [subdomain.example.com] to [192.168.0.1] which is not expected.

With other attempts returns the error (too many redirects) ... other attempts returns the error 500 ... I've already tried to enable SSL on prestashop, assign the domain [subdomain.example.com] on prestashop, activate multistore and several other attempts without any success. I found a tutorial that suggest do edit de [Link.php] file on Prestashop but don't work for me too. I can't find any material on the web that solves this problem, nor in the Prestashop documentation, so I ask for your help.

Link to comment
Share on other sites

Hi,
you can try by creating different shop and map with domain as you mention ,
As per the shop url table structure it should be possible by making some changes 

Create 2 Shop Group

one with domain having 92.168.0.10

other with  subdomain.example.com

then both url will work and resources are shared so behave same.

Please see my attached screenshots might be that help to you .

Screenshot_2021-03-20_15-35-58.png

Screenshot_2021-03-20_15-33-55.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...