2 Nginx Virtual Servers on one physical server behind HAPROXY
-
If you take a look at these to sites you will see my issue,
https://blog.ahmza.com
https://shop.ahmza.comI have setup two virtual nginx servers on ubuntu 20.04 server and I have HAproxy setup on my pFsense firewall
Here is the nginx config for the shop sub domain
server { listen 80; listen [::]:80; server_name shop.ahmza.com; root /var/www/shop; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:2368; } location ~ /.well-known { allow all; } client_max_body_size 50m; }Here is the nginx config for the blog sub domain
server { listen 80; listen [::]:80; server_name blog.ahmza.com; root /var/www/ghost/system/nginx-root; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:2368; } location ~ /.well-known { allow all; } client_max_body_size 50m; }I cant see the problem here because they have separated root folders, i think its to do with the proxy stuff but i cant figure it out
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy