Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

NGINX redirection Problem - Please help me

$
0
0
Hello everyone,

I am new to Nginx and this forum so I hope you can help me out.
I am curently developping a website made out of multiple site.
I have 3 independant wordpress sites that are all link via landing page.

The structure is as follow

User goes to www.maindomain.com and end up on a landing page.
From there, they can access 3 sites (by clicking on image). The links to the images goes to

restaurant.maindomain.com
hotel.maindomain.com
winery.maindomain.com

The roots of the sites are:
/www/webs/maindomain_com/live/main
/www/webs/maindomain_com/live/restaurant/httpdoc
/www/webs/maindomain_com/live/hotel/httpdoc
/www/webs/maindomain_com/live//winery/httpdoc

In the DNS i have set the 3 subdomain as well as the main domain.

The problem that I have is how do I create my 4 server block so that when Nginx see subdomain.maindomain.com, it uses the root directoy for that website.

Hope I explained it correctly.

Thank you all in advance

Fred

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>