Hostname == Virtual Host => Problem?

Greetings!

I feel like this is a stupid problem, but as I am a newbie I hope you will be forgiving :slight_smile:

My server has as hostname "hostname.de". I installed Virtualmin an created a new Virtualhost named "hostname.de".

In the Webmin/Server/Apache area, I see now two entries:

Default Server
Address: Any
Post: Any
Server Name: Automatic
Document Root: Automatic
URL: http://hostname.de

Virtual Server
Address: xxx.xxx.xxx.xxx
Post: 80
Server Name: hostname.de
Document Root: /home/hostname.de/public_html
URL: http://hostname.de

When I open the url, the index page is opened, but no php is executed.

I tested around and installed wordpress through Virtualadmin into /wordpress and there, PHP is executed.

If there is more information I should provide, please tell me so.

  • Jérôme<br><br>Post edited by: jeromegamez, at: 2008/02/28 14:43

This is a frequently asked question. If someone else is presently facing this challenge. To facilitate future configurations, and to reduce risks of future challenges, it is suggested to use different names for the hostname and the Virtualmin Virtual Server.

Suggested naming format

  • Hostname: host.domain.tld
  • Virtualmin Virtual Server: domain.tld

Assumptions

  • Assumes the hostname is a Fully Qualify Domain Name (FQDN)
  • Assumes by host.domain.tld we mean for example this: ns1.yourdomainname.ca
  • Assumes by domain.tld we mean for example this: yourdomainname.ca
  • Assumes by “future challenges” we mean that if the hostname and Virtual Server both use the same name, this is risky to result in challenges, such as, but not limited to, handling of incoming email messages.

Related documentation

Fully qualified domain name

If your system does not have a fully qualified domain name (FQDN), the installer will stop and ask you to choose one. This is mandatory because many services rely on having a fully qualified domain name in order to function. Mail, in particular, but some Apache configurations and many of the Virtualmin-created configuration files, also require a valid fully qualified domain name to function correctly. A fully qualified domain name is one of the form “www.virtualmin.com”, or simply “virtualmin.com”. We recommend you choose a name that is not one for which you will be receiving mail, in order to simplify later configuration. A good choice is to use a name server designator, such as “ns1.virtualmin.com”. Some customers also choose something like “host1.virtualmin.com” or “primary.virtualmin.com”. Any of these would be valid and would satisfy the install script and the services that rely on this option. The install script will add this name to /etc/hosts, which will satisfy all local services. It is even better if this name resolves correctly when looked up from outside of the system–this requires the name be added to your DNS zone for the second level domain. If the Virtualmin server you are installing will be the authoritative name server for this zone, you can later use Webmin to add a record for this name to the zone.

Source Automated Virtualmin Installation – Virtualmin

Thanks to andreychek’s related comment at hostname and virtualserver cant be the same? - #2 by Eric

This topic was automatically closed 14 hours after the last reply. New replies are no longer allowed.