Webmin Virtual Hosts not working

They have: 7 posts

Joined: May 2010

Hi...

I've set up a vanilla version of SuSE 11.1 on an Intel dual core machine running Webmin 1.51. I have added the virtual hosts via the Webmin GUI and the ../vhosts.d/ files get created. I haven't messed with the default httpd.conf file at all.

The problem is, when I surf to the virtual websites, I keep getting the default website, not the virtual one(s). I've opened an entry with Webmin several days ago and have yet to get a response.

I'm sure this is something simple I've missed.

Please help end my frustration!

Thanks...

Blaine

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Hi and welcome to TWF! Smiling

* Make sure "Add name virtual server address (if needed) " and "Listen on address (if needed)" are both unchecked.
* Set the port to 80.
* Set the Document Root accordingly (something like /home/user/public_html)
* Set the Server Name to the full domain name of the virtual host.
* Make sure you are hitting the Apply Settings like at the top-right corner so the Apache server can be restarted.

If you are still having the issue after verifying those settings, please post the vhost.d file that is created.

They have: 7 posts

Joined: May 2010

OK... sounded good, however, I've checked all the points you mention, I think. Here's the vhosts.d subfile in question...

DocumentRoot /srv/www/patriciaspostcards

allow from all
Options +Indexes

ServerName patriciaspostcards.com
LogLevel debug

I turned on loglevel to high in the hopes of catching an error, but for naught.

Any assistance is appreciated.

Thanks!

Blaine

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

What's the IP address of the server that the domain should be pointing to?

They have: 7 posts

Joined: May 2010

76.197.20.163

They have: 7 posts

Joined: May 2010

And thank you for being so patient...

They have: 7 posts

Joined: May 2010

I've also tried:

DocumentRoot /srv/www/patriciaspostcards

allow from all
Options +Indexes

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Here is the configuration from one of my virtual server entries:

<VirtualHost *>
DocumentRoot "/home/andrew/public_html/"
ServerName andrew.server-01.home.wellsie.net
<Directory "/home/andrew/public_html/">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

Try coping this with your DocumentRoot, ServerName, and Directory.

They have: 7 posts

Joined: May 2010

Sorry to be so long... Mother's Day and all that...

I tried the changes you suggested by copying your config into mine and changing the parameters to mine. It still doesn't work...

I got another hint from someone else about apache2ctl -S... Would that help? I don't understand the results... Here they are...

apache2ctl -S
httpd2: apr_sockaddr_info_get() failed for gtpam
httpd2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:* gtmachining.com (/etc/apache2/vhosts.d/webmin.1269726043.conf:1)
*:* 127.0.0.1 (/etc/apache2/vhosts.d/webmin.1273368591.conf:1)

All I can tell is that it never gets to patriciaspostcards or even gtmachining, the first VHost I defined.

Again, thanks for your time and consideration.

Blaine

They have: 7 posts

Joined: May 2010

programmer...

OK, I got it working...

By brute force. Here's what I've done. I scrubbed another server down to bare-metal. I reloaded SuSE 11.2. I reloaded webmin from rpm.

Now, as before, when I add a virtual server it appears.

Only problem now, is that they all default to the last virtual server created. So I have other problems. Related, but new...

This is too weird for me. I may go over to the Dark Side and try IIS 7.5... It's almost as secure as apache now and a whole lot easier to configure... I think. We'll see. I'm going to keep futzing with this for a few more days and decide.

If you think of anything else, please... don't hesitate to write. My email is bmiller@coastside.net.

Thanks for all your help...

Blaine

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

I see a website there now, but it doesn't look like the intended site. Remember that it goes down the list and the first time it finds a match, it uses that virtual host, so you might have another entry that has "8" set for the host or something. I will have another look at it tomorrow.

In the meantime, try running through this: http://www.sakuiweb.com/articles/configure_apache_virtual_hosts/

They have: 1 posts

Joined: May 2010

If you're still trying to find the problem, I could have a solution.

I had the same problem myself today, adding virtual hosts in Webmin 1.150 added entries, but wouldn't change the target when you browse to the new hostname.

To get things working properly, I removed the Include line from /etc/apache2/apache2.conf to remove the Webmin generated entries:

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

And put in virtual host details for as many entries as i needed:

<VirtualHost *:80>
   ServerName test.local
   DocumentRoot /var/www/test
</VirtualHost>

These entries show up in Webmin as normal, can be edited using Webmin (but not created), and the virtual host routing is works as expected.

(Having said that, I don't know why the problem occurs)

They have: 1 posts

Joined: Dec 2010

Thanks for sharing infomation!!!!!!!!!!!!!!!!!!!!

_________________________

du hoc
tu van du hoc
hoc bong du hoc
du hoc singapore

They have: 58 posts

Joined: Dec 2010

Ah that's a terrible thing - thankfully I've never come across something like that in past 5 years. By the way, I was planning on migrating to a good VPS from sharing hosting server - can anyone suggest a good VPS provider except HostGator?

Consult the best indian seo company to boost your SERP rankings.

Grab the latest tech news and SEO updates on SeoEncyclopedia.com

They have: 59 posts

Joined: Aug 2011

I don't know about it. If you have more information about it then please share with us.

They have: 6 posts

Joined: Nov 2011

Webmin module for the accepted admission control appearance are used, and is set to automatically absolute the user appropriately. These server administrators can also manage mailboxes and mail aliases for a area through a web interface, which is allotment of the module.

He has: 39 posts

Joined: Jan 2012

I am new in this field and not know much about it. But Google is the best search engine in the world. Google is your friend go to Google write your problem and it gives you the best solution.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.