I have a vps and I'm using webmin. I was able to setup the dns and domain but the problem is when I add a 2nd domain it gets redirected to my main domain. Anyone know what I'm doing wrong?
I already have made a virtual server for the new domain but it still gets redirected to the main domain
Please follow the steps below to create a virtual host using Webmin: Open your Webmin control panel -> Servers -> Apache WebServer -> Create virtual host. Select 'Any Address' in the 'Handle connections to address' section. Enter 80 for Port (and select the last radio button). Enter the location where your website files will be in the 'Document Root' field (e.g. /home/your_user/your_domain.com/) Enter your domain name in the 'Server Name' field (and select the last radio button). Click 'Create Now'. Go back to 'Apache Webserver' and click 'Apply Changes' link located on the top right side of the screen for the changes to take effect.
check your httpd.conf make sure this correct example: <VirtualHost 10.1.2.3> => your server IP ServerAdmin webmaster@blablabla => your serveradmin email address DocumentRoot /www/docs/host.foo.com => your domain document location! ServerName host.foo.com => your domain </VirtualHost> For more httpd.apache.org/docs/1.3/mod/core.html#virtualhost
You can upload your httpd.conf here, and someone will see it. Btw, here's my way to add domain name to VPS: - Set nameserver to everydns.net - Use everydns.com to add A record yourdomain.com, www.yourdomain.com, *.yourdomain.com to your VPS server, e.g 11.22.33.44 - Config your httpd.conf file, plz remember these values: Listen 11.22.33.44:80 <VirtualHost 11.22.33.44:80> ServerName yourdomain.com ServerAlias *.yourdomain.com DocumentRoot /var/www/yourdomain </VirtualHost> Code (markup): Make sure there's no .htaccess file that affect directory /var/www/yourdomain To add one more domain name, simply add another VirtualHost block with 11.22.33.44:80 Hope this help.