Click to See Complete Forum and Search --> : Configuring Apache 2.0 on RedHat 8.0
timmah
12-05-2002, 08:41 PM
Okay, I'm trying to get as much information on this so I can make informed decisions when I try to get my webserver up and running.
First, here's what I'm going to be doing with it.
I plan on serving at least 3 websites off my server. All of which have DNS names.
Now, after starting the config in visual mode, and reading the help file along with it, I've run into a couple of questions...
1) Do I want to use the default virtual host, an IP based virtual host or a name based virtual host?
2) When it asks for an IP address, do I put in the purely numerical one (66.190.8.242) or the more verbose alpha/numeric one?
3) What all will change once I have my router up and running?
Thanks for the input!
shad0w
12-06-2002, 02:47 AM
Originally posted by timmah
1) Do I want to use the default virtual host, an IP based virtual host or a name based virtual host?
2) When it asks for an IP address, do I put in the purely numerical one (66.190.8.242) or the more verbose alpha/numeric one?
3) What all will change once I have my router up and running?
1. This depends. I would do IP based. If they are going to have teh same IP and you don't want to have to mess with anymore configuration then use a * instead of the IP.
2. Read answer #1
3. Not if you use the wildcard '*' instead of an IP.
Don't do name based hosting because it takes longer for a site to come up because apache has to do a DNS lookup unless you have it stored in your /etc/hosts file.
timmah
12-06-2002, 04:52 AM
Originally posted by shad0w
1. This depends. I would do IP based. If they are going to have teh same IP and you don't want to have to mess with anymore configuration then use a * instead of the IP.
2. Read answer #1
3. Not if you use the wildcard '*' instead of an IP.
Don't do name based hosting because it takes longer for a site to come up because apache has to do a DNS lookup unless you have it stored in your /etc/hosts file.
Hrmm, hadn't heard this...
Okay...So, where it asks for IP Address: I put "*" (without quotes)? And I still put the DNS name in the other space?
In addition to that, when i log as root and go into GNOME, I'm getting an error saying: "Could not look up internet address for
dhcp-490-0. THis will prevent GNOME from operating correctly. It may be possible to correct the problem by adding dhcp-490-9 to the file /etc/hosts"...Just how exactly do I add that in? Like this?
24.232.194.23 dhcp-490-9 dhcp
???
Thanks for the help!
shad0w
12-06-2002, 11:07 AM
Originally posted by timmah
Hrmm, hadn't heard this...
Okay...So, where it asks for IP Address: I put "*" (without quotes)? And I still put the DNS name in the other space?
In addition to that, when i log as root and go into GNOME, I'm getting an error saying: "Could not look up internet address for
dhcp-490-0. THis will prevent GNOME from operating correctly. It may be possible to correct the problem by adding dhcp-490-9 to the file /etc/hosts"...Just how exactly do I add that in? Like this?
24.232.194.23 dhcp-490-9 dhcp
???
Thanks for the help!
* works. This is how I do it:
<VirtualHost *>
ServerAdmin webmaster@shad0w.com
DocumentRoot /shad0w/www
ServerName shad0w.net
ServerAlias www.shad0w.com shad0w.com www.shad0w.net
<Directory /shad0w/www/foo>
AllowOverride AuthConfig
order allow,deny
allow from all
Options Indexes
</Directory>
ErrorLog /shad0w/logs/shad0w-error_log
CustomLog /shad0w/logs/shad0w-access_log common
</VirtualHost>
As for your name lookup problem... You can use DNS to call your box someting different and then in apache set the ServerName directive to whatever your FQDN is. But if the error is coming from the system and not Apache then you may need to check somewhere else.
Or you could edit the /etc/hosts file to eliminate the problem. but you do not need the trailing dhcp I don't think just the:
24.232.194.23 dhcp-490-9
timmah
12-06-2002, 05:24 PM
Okay, should have things pretty well setup, however, when I try to restart httpd from the command, the stop httpd command fails and then I get this error when it tries to restart:
Starting httpd: (98)Address already in use: make_sock: could not bind to address 24.197.232.149:80
no listening sockets available, shutting down
any ideas here?
And before someone points me to any of the previously answered questions in this vein, I have done searches for every single little snippet of this error message...Either the responses didn't work, or they are for a version totally foreign to RH 8.0...I have actually gotten to the point mentioned in my signature...http://www.smileypage.com/sm03/pcangry.gif
TIA!
Originally posted by timmah
...when I try to restart httpd from the command, the stop httpd command fails and then I get this error when it tries to restart:
Starting httpd: (98)Address already in use: make_sock: could not bind to address 24.197.232.149:80
no listening sockets available, shutting down...
is it possible that a ./apachectl -k stop is not killing all the server processes? does ps aux | grep httpd show any residual httpd?
is it possible that another server/service is running on the same port? when Apache is down, does netstat -lav show any services bound to port 80?
Regards
theN
timmah
12-07-2002, 03:38 PM
Originally posted by theN
is it possible that a ./apachectl -k stop is not killing all the server processes? does ps aux | grep httpd show any residual httpd?
is it possible that another server/service is running on the same port? when Apache is down, does netstat -lav show any services bound to port 80?
Regards
theN
Okay, this is interesting...Just tried apachectl -k stop and got an error that says "httpd (no pid file) not running" Hrmmm....
ps aux | grep httpd give me:
root 1681 0.0 1.3 3204 616 pts/0 S 13:34 0:00 grep httpd
Anyone good at cryptography? ;)
And I've tried different variations of nestat -whatever and I get so many results that they're scrolling off my page...
Originally posted by timmah
Okay, this is interesting...Just tried apachectl -k stop and got an error that says "httpd (no pid file) not running" Hrmmm....
ps aux | grep httpd give me:
root 1681 0.0 1.3 3204 616 pts/0 S 13:34 0:00 grep httpd
Anyone good at cryptography? ;)
And I've tried different variations of nestat -whatever and I get so many results that they're scrolling off my page...
this may not be relevant, but who's the owner of the Apache directory and who owns the apachctl file?
I think pid stands for ProcessID(not very sure though). All I know is Apache creates a pid file when its running and then deletes it as soon as it shutdown.
Regards
theN
timmah
12-07-2002, 10:12 PM
Originally posted by theN
this may not be relevant, but who's the owner of the Apache directory and who owns the apachctl file?
I think pid stands for ProcessID(not very sure though). All I know is Apache creates a pid file when its running and then deletes it as soon as it shutdown.
Regards
theN
Uhhhhhh, let me check on the ownership...You mean who has permissions to access it? Well, I've been logging in as root, so permissions shouldn't matter...
So, in regards to PID, since it's not running, there wouldn't be a pid...Which makes since, since it fails when it tries to stop (tough to stop when you're not running), but the thing that's pissing me off, is that I can't get it started...