You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jonesy <gm...@jonz.net> on 2007/02/08 23:02:57 UTC

[users@httpd] Re: apache/linux newbie has Test Page that won't die

On Thu, 8 Feb 2007 15:11:48 -0500, Urijah Kaplan wrote:

> Any suggestions?

Browser cache?

Jonesy
-- 
  Marvin L Jones    | jonz          | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
    *** Killfiling google posts: <http://jonz.net/ng.htm>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Urijah Kaplan <ur...@gmail.com>.
I renamed it to index.html (from default.htm) still nuthin'. I also
double checked that that file is a completely different from the Test
file.

On 2/8/07, Richard de Vries <ri...@yahoo.com> wrote:
> Put a file called "index.html" in your docroot ...
> that's what resolved it for me.
>
>
> --- Urijah Kaplan <ur...@gmail.com> wrote:
>
> > I pressed refresh about a million times, and used
> > two different
> > browsers. Try it yourself--  208.109dot216.147 Thank
> > you for trying
> > though.
> >
> >
> > On 2/8/07, Jonesy <gm...@jonz.net> wrote:
> > > On Thu, 8 Feb 2007 15:11:48 -0500, Urijah Kaplan
> > wrote:
> > >
> > > > Any suggestions?
> > >
> > > Browser cache?
> > >
> > > Jonesy
> > > --
> > >  Marvin L Jones    | jonz          | W3DHJ  |
> > linux
> > >   38.24N  104.55W  |  @ config.com | Jonesy |
> > OS/2
> > >    *** Killfiling google posts:
> > <http://jonz.net/ng.htm>
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > The official User-To-User support forum of the
> > Apache HTTP Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html>
> > for more info.
> > > To unsubscribe, e-mail:
> > users-unsubscribe@httpd.apache.org
> > >   "   from the digest:
> > users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail:
> > users-help@httpd.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the
> > Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for
> > more info.
> > To unsubscribe, e-mail:
> > users-unsubscribe@httpd.apache.org
> >    "   from the digest:
> > users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail:
> > users-help@httpd.apache.org
> >
> >
>
>
>
>
> ____________________________________________________________________________________
> Finding fabulous fares is fun.
> Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
> http://farechase.yahoo.com/promo-generic-14795097
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Sander Temme <sc...@apache.org>.
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



Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Urijah Kaplan <ur...@gmail.com>.
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?)

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?

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

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

5)I sense a lot of reading coming up for me...
Thanks so much!

               --Urijah


On 2/8/07, Sander Temme <sc...@apache.org> wrote:
>
> On Feb 8, 2007, at 3:56 PM, Urijah Kaplan wrote:
>
> > That worked! I restarted (I didn't know I had to do that--when am I
> > supposed to restart?) and the folder from /home/<my name>/public_html
> > popped up. Seizing the opportunity, I put in my website there
> > (changing the default.htm to index.html) and it worked! So, this
> > experience leaves me with a few questions
> >
> > 1.When should I know to restart the server?
>
> When you change the configuration file(s). Usually, a 'graceful'
> restart is enough.
>
> > 2. Why aren't the pages being served from /var/www/html/ like the
> > DocumentRoot says? Is there another configuration file that's
> > overriding it somewhere?
>
> As soon as you define <VirtualHost> containers, they take over from
> the 'Main Server' configuration. The first virtual host in your
> configuration is the Default and receives non-matching requests (that
> don't contain a matching Host: header).
>
> > 3) Why can't I use default.htm (not a big deal obviously)
>
> Add it to the DirectoryIndex directive. You can do this per virtual
> host.
>
> > 4) Since I clearly don't know what I'm doing, what would be a good
> > resource/book to use to teach me more about Apache/Linux?
>
> The Apache documentation:
>
> http://httpd.apache.org/docs/2.2/
>
> I have always liked "Apache: the Definitive Guide" by Ben and Peter
> Laurie:
>
> http://www.amazon.com/dp/0596002033?
> tag=sandersweblog-20&camp=14573&creative=327641&linkCode=as1&creativeASI
> N=0596002033&adid=0H8M3S43QATSYC94MFXZ&
>
> Also, hang out on this list and you'll be helping other people in no
> time!
>
> S.
>
> --
> sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Sander Temme <sc...@apache.org>.
On Feb 8, 2007, at 3:56 PM, Urijah Kaplan wrote:

> That worked! I restarted (I didn't know I had to do that--when am I
> supposed to restart?) and the folder from /home/<my name>/public_html
> popped up. Seizing the opportunity, I put in my website there
> (changing the default.htm to index.html) and it worked! So, this
> experience leaves me with a few questions
>
> 1.When should I know to restart the server?

When you change the configuration file(s). Usually, a 'graceful'  
restart is enough.

> 2. Why aren't the pages being served from /var/www/html/ like the
> DocumentRoot says? Is there another configuration file that's
> overriding it somewhere?

As soon as you define <VirtualHost> containers, they take over from  
the 'Main Server' configuration. The first virtual host in your  
configuration is the Default and receives non-matching requests (that  
don't contain a matching Host: header).

> 3) Why can't I use default.htm (not a big deal obviously)

Add it to the DirectoryIndex directive. You can do this per virtual  
host.

> 4) Since I clearly don't know what I'm doing, what would be a good
> resource/book to use to teach me more about Apache/Linux?

The Apache documentation:

http://httpd.apache.org/docs/2.2/

I have always liked "Apache: the Definitive Guide" by Ben and Peter  
Laurie:

http://www.amazon.com/dp/0596002033? 
tag=sandersweblog-20&camp=14573&creative=327641&linkCode=as1&creativeASI 
N=0596002033&adid=0H8M3S43QATSYC94MFXZ&

Also, hang out on this list and you'll be helping other people in no  
time!

S.

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



Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Urijah Kaplan <ur...@gmail.com>.
That worked! I restarted (I didn't know I had to do that--when am I
supposed to restart?) and the folder from /home/<my name>/public_html
popped up. Seizing the opportunity, I put in my website there
(changing the default.htm to index.html) and it worked! So, this
experience leaves me with a few questions

1.When should I know to restart the server?
2. Why aren't the pages being served from /var/www/html/ like the
DocumentRoot says? Is there another configuration file that's
overriding it somewhere?
3) Why can't I use default.htm (not a big deal obviously)
4) Since I clearly don't know what I'm doing, what would be a good
resource/book to use to teach me more about Apache/Linux?

Thank you so much to everyone that helped!

           --Urijah Kaplan

On 2/8/07, Sander Temme <sc...@apache.org> wrote:
>
> On Feb 8, 2007, at 2:50 PM, Urijah Kaplan wrote:
>
> > 208.109dot216.147
>
>  curl -i http://208.109.216.147/
> HTTP/1.1 403 Forbidden
> Date: Thu, 08 Feb 2007 22:56:45 GMT
> Server: Apache/2.0.52 (CentOS)
> Accept-Ranges: bytes
> Content-Length: 5044
> Connection: close
> Content-Type: text/html; charset=UTF-8
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
> TR/xhtml11/DTD/xhtml11.dtd">
>         <head>
>                 <title>Apache HTTP Server Test Page powered by
> CentOS</title>
> (...)
>
> As you can see, the actual response you get is a 403 Forbidden.  This
> is the way Red Hat and its derivatives serve the default test page:
> in absence of an actual /var/www/html/index.html, Apache would serve
> the directory index, which is forbidden by /etc/httpd/conf.d/
> welcome.conf.  The corresponding line in the error log file is:
>
> [Tue Jan 16 11:40:08 2007] [error] [client 10.11.0.103] Directory
> index forbidden by rule: /var/www/html/
>
> You say that you commented out the welcome.conf stuff (and restarted
> Apache, right?), and yet you are still sending out 403s.  What error
> log entries are you getting when you try to access / on your server?
>
> S.
>
> --
> sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Sander Temme <sc...@apache.org>.
On Feb 8, 2007, at 2:50 PM, Urijah Kaplan wrote:

> 208.109dot216.147

  curl -i http://208.109.216.147/
HTTP/1.1 403 Forbidden
Date: Thu, 08 Feb 2007 22:56:45 GMT
Server: Apache/2.0.52 (CentOS)
Accept-Ranges: bytes
Content-Length: 5044
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/ 
TR/xhtml11/DTD/xhtml11.dtd">
         <head>
                 <title>Apache HTTP Server Test Page powered by  
CentOS</title>
(...)

As you can see, the actual response you get is a 403 Forbidden.  This  
is the way Red Hat and its derivatives serve the default test page:  
in absence of an actual /var/www/html/index.html, Apache would serve  
the directory index, which is forbidden by /etc/httpd/conf.d/ 
welcome.conf.  The corresponding line in the error log file is:

[Tue Jan 16 11:40:08 2007] [error] [client 10.11.0.103] Directory  
index forbidden by rule: /var/www/html/

You say that you commented out the welcome.conf stuff (and restarted  
Apache, right?), and yet you are still sending out 403s.  What error  
log entries are you getting when you try to access / on your server?

S.

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



Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Richard de Vries <ri...@yahoo.com>.
Put a file called "index.html" in your docroot ...
that's what resolved it for me.


--- Urijah Kaplan <ur...@gmail.com> wrote:

> I pressed refresh about a million times, and used
> two different
> browsers. Try it yourself--  208.109dot216.147 Thank
> you for trying
> though.
> 
> 
> On 2/8/07, Jonesy <gm...@jonz.net> wrote:
> > On Thu, 8 Feb 2007 15:11:48 -0500, Urijah Kaplan
> wrote:
> >
> > > Any suggestions?
> >
> > Browser cache?
> >
> > Jonesy
> > --
> >  Marvin L Jones    | jonz          | W3DHJ  |
> linux
> >   38.24N  104.55W  |  @ config.com | Jonesy | 
> OS/2
> >    *** Killfiling google posts:
> <http://jonz.net/ng.htm>
> >
> >
> >
>
---------------------------------------------------------------------
> > The official User-To-User support forum of the
> Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html>
> for more info.
> > To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
> >   "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail:
> users-help@httpd.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 



 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: apache/linux newbie has Test Page that won't die

Posted by Urijah Kaplan <ur...@gmail.com>.
I pressed refresh about a million times, and used two different
browsers. Try it yourself--  208.109dot216.147 Thank you for trying
though.


On 2/8/07, Jonesy <gm...@jonz.net> wrote:
> On Thu, 8 Feb 2007 15:11:48 -0500, Urijah Kaplan wrote:
>
> > Any suggestions?
>
> Browser cache?
>
> Jonesy
> --
>  Marvin L Jones    | jonz          | W3DHJ  | linux
>   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
>    *** Killfiling google posts: <http://jonz.net/ng.htm>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org