Nginx Routing for Subdomain

by jackhammer013   Last Updated April 16, 2018 07:00 AM

We have a website that is running using nginx:

mywebsite.com.au

and let's say it's IP is 192.168.1.1

Then we have an account in https://cp.dnsmadeeasy.com/ we are using this to manage all our dns routing. We have a portal which is located in

mywebsite.com.au/portal

So bascially the portal is just a directory inside mywebsite.com.au.

What we want to do is add a subdomain portal.mywebsite.com.au. We need a portal subdomain so we added an entry to dnsmadeeasy.

What we want is when you browse portal.mywebsite.com.au is we can see the same thing in mywebsite.com.au/portal so it's like a mirror of our portal. So we added the portal subdomain and also point it to same IP Address 192.168.1.1. So technically it is pointed in the same server.

When I browse the site, portal.mywebsite.com.au it says nginx 403 forbidden.

My question is that, is mywebsite.com.au and portal.mywebsite.com.au is being served in the same nginx installation or config? How do I map in nginx portal.mywebsite.com.au to render the same content or files that is located in mywebsite.com.au/portal



Related Questions


How to implement DNS IP based on full url path

Updated July 13, 2017 14:00 PM



How to use my domain as a extension

Updated January 30, 2018 00:00 AM

Redirect a Domain to a URI without reload

Updated March 06, 2017 10:00 AM