I’m currently evaluating VirtualMin GPL for production environment and ran into a problem. Some details about my installation:
- m1.small instance in EC2 Singapore region
- Amazon Linux AMI (2012.09)
- Installed using install.sh
A few things I did that were out of the ordinary:
- Edited install.sh line 597 to download the 2012.03 ‘virtualmin-release-latest.noarch.rpm’ instead
- In Post-Installation Wizard, I specified my (resolvable) hostname as primary nameserver, not sure if I should have used ‘ns1.he.net’ instead. All hosted Virtual Servers will have their DNS records hosted with dns.he.net
- Updated default server IP address to my elastic IP
- Unsure of the WebMin interface, I stopped the webmin service, manually formatted my instance store volume and additional 5GB EBS volume with XFS and mounted them as /home and /var respectively.
After rebooting, local disk space appeared ok so I proceeded to create a Virtual Server. This is where I ran into some problems (my test domain is globalcauseways.com).
I’ve not altered the httpd.conf and its corresponding VirtualHost entries for port 80 and 443 appears to be normal. I’ve attached them here:
Thanks in advance for your help and let me know if I should provide more info!
Just terminated the last instance and tried with ami-503c4702, Virtualmin GPL’s AMI for Singapore to pretty much the same results, except the Apache default page shows instead of an empty directory listing.
I’m sure it’s some pretty obvious setting I’ve overlooked. Any ideas?
You may be seeing some sort of IP address mismatch, which can cause Apache to show the wrong website.
There’s details on how to solve that here:
Had a chance to go through my logs and /etc/httpd/conf/httpd.conf and found the problem. Hope this helps anyone else facing the issue described above.
For Ubuntu instances, the .conf file might differ (try looking for /etc/apache2/apache2.conf & /etc/apache2/sites-enabled/*).
This relates specifically to EC2 deployments, where there is an internal IP address and an Elastic IP. After installing VirtualMin and completing the ‘Post-Installation Wizard’, I went to System Settings > Virtualmin Configuration > Networking settings and replaced ‘Default virtual server IP address’ to my Elastic IP, which I believe caused the VirtualHost entries in httpd.conf to be written as :80 and :443.
To resolve the problem, replace Elastic IP with internal IP. I’m still trying to figure out where the Elastic IP should go and where the internal IP should be, will post back when I have it figured out. An official note on this would also be much appreciated!
Thanks for the link! Corrected my misconfiguration in System Settings > Virtualmin Configuration > Network settings to:
- Network interface for virtual addresses: eth0
- Default virtual server IP address: From network interface
- Default IP address for DNS records: Automatically detect external address
Pleased to report that httpd.conf looks good and my simple ‘Hello World’ loads as expected now. Thanks!
Places to check…
Virtualmin -> Edit Virtual Server got to Configurable settings
For External IP address, select the 2nd radio button type ur ISP (external) IP Address
Virtualmin -> System Settings -> Virtualmin Configurations ->
From the Category dropdown menu select Networking Settings ->
Network interface for virtual addresses: select second radio button and make sure it said eth0
Default virtual server IP address, select: select the 2nd radio button type ur internal IP Address
Default IP address for DNS records Select: select Other Options radio button & type you ISP IP Address
Virtualmin -> Server Configuration DSN Options -> check in Allowed sender IP addresses, you should have your internal and external IP address in there.
Virtualmin -> Server Configuration DSN Records -> should have all your nameserver and IP address in there. Good luck
Here is something else u can use to check if you server configuration is good:
http://www.intodns.com/blablabla.com Just replace your domain name
Thanks for your reply! I’ve already resolved this issue with Eric’s link to the Website Troubleshooter.
Your recommendation is much more detailed and while differing slightly from the guide:
Network interface for virtual addresses - This is automatically detected by Virtualmin during the configuration check, but could be detected incorrectly, if you have multiple physical interfaces, or your system is some virtualized system like a vserver or Zone or OpenVZ instance. You would typically want this to be the primary IP address of your server – in most cases that is “eth0”.
Default virtual server IP address - We recommend leaving this as it’s default of “From Network Interface”.
Default IP address for DNS records - If your server is behind a NAT router, this option should be set to “Automatically detect external address”. Otherwise, you should leave it at the default of “Same as virtual server IP”.
I believe both achieve the same goal of:
- Make VirtualHost entries to listen on private IP address behind NAT for requests.
- Use public IP address in DNS entries
Your link to intoDNS is also a valuable resource, which I will definitely bookmark and use often.
Thanks again for your input!
No problem jamesfu and glad you got ur problem solved