Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Since you didn't mention your distro, I guess it's debian or ubuntu, as they are the only distros that use sites-enabled for vhosts.
Also check if the name you gave to this vhost (myapps.myserver.com) and the name you have in /etc/hosts (or dns) are the same, or there is some hard to see typo.
Regards
Last edited by bathory; 03-08-2012 at 12:34 AM.
Reason: Additional info
The output of apache2ctl -S is something like
------------------------------
*:80 is a NameVirtualHost
default server myapps.myserver.com (/etc/apache2/apache2.conf:233)
port 80 namevhost myapps.myserver.com (/etc/apache2/apache2.conf:233)
port 80 namevhost myapps.myserver.com (/etc/apache2/apache2.conf:237)
port 80 namevhost phpmyadmin.myserver.com (/etc/apache2/apache2.conf:247)
------------------------------
This is copy-paste from the actual output, but I had to use "myapps" and "myserver" in this mail, as I am not allowed to mention the real application or server name in a public forum.
I am using ubuntu Linux. I am not the system administrator of this server and have not made any change myself in etc/hosts or any dns files.
The /etc/hosts, looks like the following (the machine name is rhine)
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
---------------------------------------------------------------------
The dns was configured by the system administrator. I do not know which file I should look for. But in general the dns looks ok, as I can access the machine from internet by both myapps.myserver.com and phpmyadmin.myserver.com
Follwoing is the copy paste of the relevant section from /etc/apache2/apache2.conf (changing application and server name).
------------------------------------------------------------------------
# Include generic snippets of statements
Include conf.d/
# Include the virtual host configurations:
#Include sites-enabled/
<Directory "/var/www/phpmyadmin">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
---------------------------------------------------------------------------------------
I guess the issue is Apache is treating myapps.myserver.com as the default server (as seen in apache2ctl -S), and accordingly showing the index.html from the default root /var/www. It is ignoring the DocumentRoot declaration of myapps.myserver.com in apache2.conf.
I guess the issue is Apache is treating myapps.myserver.com as the default server (as seen in apache2ctl -S), and accordingly showing the index.html from the default root /var/www. It is ignoring the DocumentRoot declaration of myapps.myserver.com in apache2.conf.
Nope. Apache is using the 1st vhost as the default. In your case, it's the one with docroot /var/www. You can give it a dummy ServerName (e.g. localhost), so when you're trying to access myapps.myserver.com it uses the correct vhost.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.