How to set up Nginx reverse proxy to use with Shopify store

Highlighted
New Member
17 0 0

We would like to create custom blog that will be hosted under the subfolder like https://ourshop.com/blog.

So we decided to setup the Nginx reverse proxy that will point to our new blog on one server and to our Shopify shop with these settings:

 

#this is a config for our Shopify store that we want to run in ourdomain.com/shop folder

location /shop { proxy_pass https://our-shopify-site.com/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }

 

Unfortunately this config doesn't work and we're blocked by Cloudflare that just returns : 403 Forbidden

How to set up headers to make it work/?

0 Likes