httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <scte...@apache.org>
Subject Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die
Date Fri, 09 Feb 2007 03:32:26 GMT

On Feb 8, 2007, at 5:35 PM, Urijah Kaplan wrote:

> Okay, at first glance what you said was just a lot of jargon. I'm
> slowly trying to translate, so please tell me if I'm on the right
> track.
>
> 1) What's a "graceful" restart? Right now, I'm just pressing restart
> on the simple control panel godaddy gives me. When I ssh in, what
> should I type in? (I'm guessing you mean restarting Apache and not the
> whole server--right? How do you do that?)

Godaddy?  I thought we were talking about your server?  Or do you  
lease your server from Godaddy?

Anyway, from our preceding conversation I assume that your Apache is  
installed from a Centos (or Red Hat Enterprise) RPM package.  This  
package typically installs a startup script /etc/init.d/httpd:  
execute this without arguments to see what it can do:

[root@centos38 root]# /etc/init.d/httpd
Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus| 
graceful|help|configtest}

These are far more options than Apache provides by default, and most  
of them have to do with Red Hat specific stuff, but note the presence  
of 'restart' and 'graceful'.

restart makes Apache re-read its configuration file. All child  
processes are terminated, and users currently being served a page  
will be cut off.

graceful makes Apache re-read its configuration file, but the child  
processes are allowed to finish serving their current requests before  
dying.

> 2)  Where are these VirtualHost Settings stored? I don't see them in
> /etc/httpd/conf/welcome.conf I don't really need a VirtualHost (I
> think), because this server will be for only one site. Is there any
> downside to using a Virtual Host?

The Red Hat package, which is NOT a standard configuration of Apache,  
is configured through /etc/httpd/conf/httpd.conf, which includes all  
the files /etc/httpd/conf.d/*.conf . If you have any VirtualHost  
declarations for a listening port, the first of those in the list  
will get all requests on that port, except if there is a  
NameVirtualHost and the client is accessing sites by name. The  
default configuration has one virtual host, for SSL.

The matching algorithm is complicated and occasionally trips me up,  
too.  You can find information about it on:

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

> 3) What does "non-matching requests (that don't contain a matching
> Host: header)" mean?

Most web sites today operate as name-based virtual hosts, where a web  
server on one IP addres serves many sites, whose hostnames all  
resolve to the same IP address.  So how does Apache know with which  
virtual host configuration to handle each incoming request?  The  
solution is that all modern browsers send a "Host: hostname" header  
along with its requests.  The server uses that information to route  
the incoming requests.  Requests without that Host: header (like  
Internet Explorer 2 used to send) arrive at a default virtual host,  
which is the first listed in your configuration file that listens on  
the Port that receives the request.

> 4)Where is the DirectoryIndex directive? What does it do?

http://httpd.apache.org/docs/2.0/mod/mod_dir.html#directoryindex

> 5)I sense a lot of reading coming up for me...

Enjoy.  The advantage of a steep learning curve is that you get to  
learn a lot in a very short time.

Keep in mind that Apache is free, and you can install a copy on your  
own machine to experiment.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Mime
View raw message