Sub Domain on another server


I have 2 VPS server. My main Server is a DNS Server. I host my sub-domain on another VPS.
For doing this i have create a sub-domain Record and point to another VPS ip.
I put website on default folder /var/www/ and it started working.
I want more sub-domain hosted on second VPS so i created virtual Server for sub-domain on second VPS. So according to the folder structure I transferred my sub-domain website int /home directory. After doing this i am not able to connect my website. Can some please suggest me how can i achieve this.



Your websites on a Virtualmin server would typically be located within /home.

If that’s not working – what errors are you receiving?

You can see the error logs in $HOME/logs/error_log.


hi eric,

i am getting error like this:

2012/09/20 05:14:36 [error] 6092#0: *40 directory index of “/var/www/” is forbidden, client:, server: localhost, request: “GET / HTTP/1.1”, host: “”.

i have created a virtual server on Second VPS without DNS Record. Did i need to create DNS Record also ?



You only need DNS records setup on any servers that are acting as nameservers for that domain (your nameservers are visible when running “whois domain.tld”).

It looks like it’s trying to access /var/www for the domain, rather than the correct location in /home.

That suggests there may be some sort of Apache config issue… there’s some steps for troubleshooting that exact issue in the docs here:

Let us know if those help, or if you’re still having issues.


Thanks Eric for your suggestions.

After checking the log files. i had found the problem, its in Nginx virtual host. Its is pointing the localhost IP address after changing the IP address to my real IP address it started working.

Can you please suggest me on IDS/IPS. I have found Snort, Suricata and Samhain. Don’t know which one is good and less memory consumption. My VPS had 512mb RAM and 1 core of 3.0 ghz.


I’m glad you got it working!

Regarding IDS/IPS – I’m not overly familiar with the current batch of software out there. I might suggest starting a new forum post, where other folks are likely to see it too, and they can chime in.