Gossamer Forum
Home : General : Internet Technologies :

Does Webmin mess up httpd.conf?

Quote Reply
Does Webmin mess up httpd.conf?
What is going on here? All I did was delete a listing from httpd.conf from webmin (didnt actually touch the file, webmin did everything)...and now when I reboot apache I get;

[Mon Jul 8 10:23:51 2002] [error] Cannot resolve host name 123carlinks.com --- ignoring!
[Mon Jul 8 10:24:11 2002] [error] Cannot resolve host name ace-host.com --- ignoring!
[Mon Jul 8 10:24:31 2002] [error] Cannot resolve host name ace-installer.com --- ignoring!

etc...

Whats all that about? Do you think webmin messed up something in httpd.conf?

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
Look towards the end of your httpd.conf file for the <VirtualHost> listings. Cut and paste the info and we'll see if we can help.

Bear in mind that it could be that your DNS is down and that it simply can not resolve your domain names. If this is the case, just try again later or supply IP addresses instead of hostnames so that Apache doesn't have to do a DNS lookup each time it starts up. Use this if you're got flaky DNS! It's actually faster at startup, too.

http://httpd.apache.org/docs/dns-caveats.html

The other option is to use the new notation:

Code:
NameVirtualHost *
<VirtualHost *>

- wil

Last edited by:

Wil: Jul 8, 2002, 3:24 AM
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
Here is what I have;

Quote:
<VirtualHost 123carlinks.com:80>
DocumentRoot /home/123carlinks.com/public_html
ServerName 123carlinks.com
ServerAlias www.123carlinks.com
</VirtualHost>

<VirtualHost ace-host.com:80>
DocumentRoot /home/ace-host.com/public_html/
ServerName ace-host.com
ServerAlias www.ace-host.com
</VirtualHost>


<VirtualHost ace-installer.com:80>
DocumentRoot /home/ace-installer.com/public_html
ServerName ace-installer.com
ServerAlias www.ace-installer.com
</VirtualHost>

<VirtualHost ace-host.com:80>
DocumentRoot /home/ace-host.com/public_html
ServerName www.ace-host.com
</VirtualHost>

<VirtualHost templates.ws:80>
DocumentRoot /home/templates.ws/public_html/
ServerName templates.ws
ServerAlias www.templates.ws
#ErrorDocument 401 http://www.templates.ws/401.php
ErrorDocument 404 http://www.templates.ws/404.php
ErrorDocument 500 http://www.templates.ws/500.php
</VirtualHost>

<VirtualHost ace-clipart.com:80>
DocumentRoot /home/ace-clipart.com/public_html/
ServerName www.ace-clipart.com
ServerAlias www.ace-clipart.com
</VirtualHost>

<VirtualHost wwwtemplates.com>
DocumentRoot /home/wwwtemplates.com/public_html/
ServerName wwwtemplates.com
ServerAlias www.wwwtemplates.com
</VirtualHost>

<VirtualHost ace-installer.com:80>
DocumentRoot /home/ace-installer.com/public_html
ServerName www.ace-installer.com
ServerAlias www.ace-installer.com
</VirtualHost>

<VirtualHost sigmanu-ewu.com:80>
DocumentRoot /home/signamu/public_html
ServerName www.sigmanu-ewu.com
ServerAlias www.sigmanu-ewu.com
</VirtualHost>

<VirtualHost ace-templates.com:80>
DocumentRoot /home/ace-templates.com/public_html
ServerName ace-templates.com
ServerAlias www.ace-templates.com
</VirtualHost>


<VirtualHost www.canzine.com>
DocumentRoot /home/canzine.com/public_html
ServerName canzine.com
</VirtualHost>

<VirtualHost canzine.com>
DocumentRoot /home/canzine.com/public_html
ServerName www.canzine.com
</VirtualHost>

BTW: Can anyone recommend any good book on management of WebServers? I think I really need to get a grip on this...especially as its my full time job now Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
Andy

You've got multiple entries there!

A really good place to start is the Apache Documentation. The following document will specifically give you the information you need along with examples:

http://httpd.apache.org/...osts/name-based.html

See my previous post as to why your DNS might have failed and what you can do about it - mianly specify IP addresses.

As to a good book? How about a course? My main suggestion would be to dump Linux and go for a Windows platform as this is what you're most familiar with, and it provides a graphical interface to server management.

Cheers

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
The following book sounds like it might be of use to you, Andy:

Linux Apache Web Server Administration

http://www.amazon.com/.../103-8362611-1537401

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
I don't think it is the fact that the DNS server is offline....as it was working fine until I tried to reboot apache.

>>>You've got multiple entries there! <<<

What do you mean?

>>>How about a course? <<<

I'd love to...but they are waaay to expensive (

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
Code:
...

<VirtualHost ace-host.com:80>
DocumentRoot /home/ace-host.com/public_html/
ServerName ace-host.com
ServerAlias www.ace-host.com
</VirtualHost>


<VirtualHost ace-installer.com:80>
DocumentRoot /home/ace-installer.com/public_html
ServerName ace-installer.com
ServerAlias www.ace-installer.com
</VirtualHost>


<VirtualHost ace-host.com:80>
DocumentRoot /home/ace-host.com/public_html
ServerName www.ace-host.com
</VirtualHost>

<VirtualHost templates.ws:80>
DocumentRoot /home/templates.ws/public_html/
ServerName templates.ws
ServerAlias www.templates.ws
#ErrorDocument 401 http://www.templates.ws/401.php
ErrorDocument 404 http://www.templates.ws/404.php
ErrorDocument 500 http://www.templates.ws/500.php
</VirtualHost>

<VirtualHost ace-clipart.com:80>
DocumentRoot /home/ace-clipart.com/public_html/
ServerName www.ace-clipart.com
ServerAlias www.ace-clipart.com
</VirtualHost>

<VirtualHost wwwtemplates.com>
DocumentRoot /home/wwwtemplates.com/public_html/
ServerName wwwtemplates.com
ServerAlias www.wwwtemplates.com
</VirtualHost>

<VirtualHost ace-installer.com:80>
DocumentRoot /home/ace-installer.com/public_html
ServerName www.ace-installer.com
ServerAlias www.ace-installer.com
</VirtualHost>


...

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
If you notice, one is www.ace-host.com, and the other is ace-host.com. Don't you need both of them there for it to work with both the www. and without?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
> Don't you need both of them there for it to work with both the www. and without?

Didn't you read the document I linked to?

Quote:
Many servers want to be accessible by more than one name. This is possible with the ServerAlias directive, placed inside the <VirtualHost> section. For example if you add this to the first <VirtualHost> block above

ServerAlias domain.tld *.domain.tld

then requests for all hosts in the domain.tld domain will be served by the www.domain.tld virtual host. The wildcard characters * and ? can be used to match names. Of course, you can't just make up names and place them in ServerName or ServerAlias. You must first have your DNS server properly configured to map those names to an IP address associated with your server.

I'd also recommend you read the first URL I posted and then consider moving to NameVirtualHost * format.

- wil
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
Here's an example:

Code:

NameVirtualHost *

<VirtualHost *>
ServerName www.ace-host.com
ServerAlias ace-host.com *.ace-host.com
DocumentRoot /home/ace-host.com/public_html
</VirtualHost>

You could of done that by reading the documentation I linked to above and working through the examples.

Remember that you shouldn't need the trailing slash after your DocumentRoot. I noticed you left a trailing slash in on a few of your entries.

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
More documentation with examples for you:

http://httpd.apache.org/docs-2.0/vhosts/

http://httpd.apache.org/...vhosts/examples.html

- wil

Last edited by:

Wil: Jul 8, 2002, 4:03 AM
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
Do I replace the * in things like;

NameVirtualHost *
<VirtualHost *>

with the name of the domain name, the IP address, or something else? I've got that book on order now..should be here within the next couple of days :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
You really don't look at the pages I link to, do you? :-)

http://httpd.apache.org/...amples.html#purename

You leave the * in there. I presume that all of these virtual hosts work off one IP address, right?

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
Heheh...i do read them, but I read quite fast...so sometimes miss important stuff Tongue

How would you suggest updating httpd.conf? For some reason when trying to update it via WebMins file manager, I get the browser/applet freezing, so httpd.conf is not updated Frown

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
I don't use "WebMin" and I don't recommend it either.

Update the file on your system and then restart Apache. Use your favourite text editor, or if you don't know how to use any of them, download the file edit it on your local box and then upload it again.

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
Yes, but how would you recommend uploading/downloading the httpd.conf file? FTP won't work, as it doesn't have a root listing. At the moment, the only thing I can find that will work is WebMin to update the file Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
> FTP won't work as it doesn't have a root listing

Sorry, what does that mean?

Read up on a few docs to learn a few simple editing commands. Either that, or seriously consider MS Windows on this server. I have a feeling you're more familiar with Windows and it will save you a lot of confusion.

I don't use FTP, I use a command-line secure file copy program such as SCP.

You can get PSCP (which is the PuTTy version - it runs on Windows) here:

http://www.chiark.greenend.org.uk/.../putty/download.html

You can read up on how to use it here:

http://the.earth.li/...ldoc/Chapter5.html#5

- wil

Last edited by:

Wil: Jul 8, 2002, 6:25 AM
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
Yeah, I use PuTTY. Great little program. I worked out how to edit the files though. I just had to use pico Tongue Cool little command too.

Thanks for the help.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
Mmmm..I'm still being shown;

[Mon Jul 8 17:04:33 2002] [warn] NameVirtualHost 207.230.62.131:80 has no VirtualHosts

Any ideas?

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Does Webmin mess up httpd.conf? In reply to
Sounds like a syntax error

Double check your httpd.conf I'd strongly advise downloading it and using notepad or similar to edit.

You can copy the file to directory with FTP access, download it, edit it and reverse the process (ie. upload and copy back to the correct location)
Blacknight Solutions - Hosting
Search.ie
Armchair.ie
Quote Reply
Re: [blacknight] Does Webmin mess up httpd.conf? In reply to
>>
Sounds like a syntax error
<<

It just means that a namevhost is defined without actually having any vhosts specified. eg:

NameVirtualHost 111.111.111.111

...but then no:

<VirtualHost ....>
</VirtualHost>
Quote Reply
Re: [Paul] Does Webmin mess up httpd.conf? In reply to
I think it was actually the other way around.

All <virtualhosts ..> were defined but:

NameVirtualHost *

was still commented out.

Cheers

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
No, I think I was right first time :)

Last edited by:

Paul: Jul 14, 2002, 4:01 AM
Quote Reply
Re: [Paul] Does Webmin mess up httpd.conf? In reply to
Well, the problem there was Andy has a number of:

NameVirtualHosts

set up with some seemingly random IP addresses (one of which didn't even belong to him).

That's why I suggested going with the better format of just not specifying an IP address (if your machine only has one IP anyway):

NameVirtualHost *

And then:

<VirtualHost *>
ServerName: ......
</>

It's far more flexible this way, as if you need to move your httpd.conf file from one server to another you can do so without making any changes. :-)

- wil
Quote Reply
Re: [Wil] Does Webmin mess up httpd.conf? In reply to
Thats fine, no-one was disputing that :)