New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Apache Help
Bit of apache help needed please..
Trying to configure VirtualHosts. I have set up the files in /apache2/sites-available and have set the DocumentRoots to the corresponding root of the website. I've also enabled the sites using a2ensite.
However, all of the sites are displaying the same content (the content from the root of the default site)
Comments
Do the sites appear in the sites-enabled directory?
What does the error_log say?
In the first enabled vhost definition (usually /apache2/sites-available/default) or somewhere before the first is processed, put this at the top:
NameVirtualHost 123.132.13.123:80
Replace with your IP address.
They do
@jhadley - doesn't seem to say anything
... waiting [Fri Nov 09 20:17:44 2012] [warn] NameVirtualHost 217.172.140.43:80 has no VirtualHosts
You need to add this line in your apache config file(Before domain configuration line)
VirtualHost 217.172.140.43
(Please search in google, I can't remember exact line )
Didn't work
do you have
in your httpd.conf or apache2.conf ?
Yes, I do. It's getting the default site, however all sites are displaying the same stuff, despite virtualhosts being set up
Silly question, are all the sites pointed to the same directory by chance?
Directory and DocumentRoot's are all different (for the different sites).
are there any virtualhosts in your apache2.conf?
No
show us the results of
As you will see, dominicl.me and server1.dominicl.me display the same
service httpd restart
I have tried that one See above.
Somebody, help :P
Try removing the default vhost file.
Still not working.
server1.dominicl.me is displaying the contents in the dominicl.me root folder.
Please close.
Care to share with us what the problem ultimately was?
@NickM
Just going to use shared for now - easier and less management in the long run. I've got another use for this server
Just install Kloxo or something. We even have a kloxo host-in-a-box template
Maybe I'm misreading something, but it looks like the hostname "server1.dominicl.me" will be matched by the first vhost and so will serve content from the site defined in "/etc/apache2/sites-enabled/000-default". The 4th vhost, with the same hostname but pointing at "/etc/apache2/sites-enabled/server1.dominicl.me" will never be available, since the hostname will match the earlier vhost entry.
@kiwidave yes, you're right but even though, dev.dominicl.me should serve it's unique content. There must be other misconfigurations also.
a simple panel like kloxo or ehcp will solve the problem at a minimal performance penalty and will also automate other things like ftp and all.