Hello,
Each time I am creating a new virtual server through Virtualmin I have to manually correct the Apache’s conf file for the new domain or subdomain.
The conf file created by Virtualmin always starts with <VirtualHost *:80>. With such config, the requests to the newly created domain don’t reach it, but go to the default website of the IP instead. In I add SSL website in the features, the SSL part has the IP address <VirtualHost x.x.x.x:443> and requests go to the right server in SSL.
However I need to manually add the IP address for port 80 <VirtualHost x.x.x.x:80> to achieve the same result on port 80.
I use Virtualmin for years, and these problems arised quite recently. I installed a new Virtualmin on a VM with the script installer.sh and left the default configuration to check if the problem wasn’t caused by my tweaks. I am getting the exact same result in this config.
Is there any way to force the IP address in the VirtualHost tag?
Thanks
Description:
- Install virtualmin from scratch with install.sh on Ubuntu 14.04
- Add a new Virtual server
- Add an index.html page in /home/new_server/public_html
- Reach new domain from browser: Apache Forbidden message
- In Virtualmin, go to the new server > Website Options > check “Default website for IP address?”
- Reach new domain from browser: it works
- Create new Virtual server
- Reach new domain from browser: previous added website appears
- Change new server conf file first line from <VirtualHost *:80> to <VirtualHost x.x.x.x:80>
- Restart Apache -> it works