I have a Craft CMS blog site that is hosted on an apache web server. I would like to proxy that site to my Flask-based web app at http://example.com/blog/ where http://example.com is the main URL for the app. http://example.com/blog/ does not have any application routes so it is a safe URL to use.
Here is the relevant part of my NGINX config.
location ^~ /blog/ {
include proxy_params;
proxy_pass http://cms.example.com;
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;
}
location / {
auth_basic "Stealth Mode - Coming Soonish";
auth_basic_user_file /etc/nginx/.htpasswd;
include proxy_params;
proxy_pass http://127.0.0.1:3000;
}
My problem is that I get the following Template Not Found error.
Template not found: blog
Any ideas how to fix this? The fact that I am getting a Craft error indicates to me that the issue is a craft config issue, but I am not ruling out some sort of nginx error config error.