Prestashop behind Nginx reverse proxy #836
Unanswered
PiotrBracha
asked this question in
Q&A
Replies: 1 comment
-
I tried with clean presta 8.2.1 and also 1.7.8.10. My config works perfectly front/backoffice, so the problem is probably with some module which gives “SEO & URLs” option in the backoffice –> Preferences. Full updated code (you can use nginx snippets to have clean configuration): server {
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to run Presta behind an Nginx reverse proxy. Presta 8.2.1 is running on Nginx 1.26.3. I’ve prepared:
ps_shop_url
table, I set thedomain
anddomain_ssl
columns totest-proxy.example.com
andtest-proxy.example.com
respectively. By default,/
in physical_uri.Set up URLs:
Set shop URL:
The problem I deal with:
When I go to
test-proxy.example.com
, I get a redirect loop fromtest-proxy.example.com
totest-proxy.example.com
with a 302 status code. If I change the "Redirect to the canonical URL" option in the backoffice to 301, then I get a redirect loop with a 301 status code.Visiting any non-existent URL, e.g.
test-proxy.example.com/test
, generates the correct response/index.php?controller=404
.Visiting any existing URL, e.g.
test-example.com/about-us
, causes a redirect loop:/about-us/
302 →/about-us
302 →/about-us
302 →/about-us
and so on in a loop.If I only change in the database, in the above-mentioned table,
test-proxy.example.com
in both columns topresta-us.example.com
, then the front works, but there’s a problem with the cart. This is understandable behavior.Of course, when I completely delete reverse proxy,
presta-us.example.com
works smoothly like it should. :)I have no idea what’s going on anymore. I checked the values of the headers passed by the proxy. I also prepared a script that displayed the header values: https://pastebin.com/tmT9R2Jd
The goal:
Working Prestashop front behind nginx reverse proxy.
I also set up Wordpress behind reverse proxy, which works - frontend/backoffice - like a charm.
Beta Was this translation helpful? Give feedback.
All reactions