Simple Apache Config Question

Simple Apache Config Question

Post by Matthew T. O'Conno » Fri, 16 Oct 1998 04:00:00



Hello, I hope this is the right place to post this.  Anyway, I am a
Linux enthusiast that is still learning.  I installed RedHat5.0 on my
P75.  I'm running apache and i want to be ablel to create a public_html
directory in my /home/user directory so that I can go to a URL such as
http://www.foo.com/~user  and get to my personal web site.  I checked
the srm.conf file and it says that the UserDir is set to public_html.
The error I get from my web browser is that permission is denied.  I
have set the permissions on my public_html directory to 777, and have
granted read access to my home directory.

Please help,

Thanks in advance.

Matt O'Connor

 
 
 

Simple Apache Config Question

Post by Patrick M. Geaha » Sat, 17 Oct 1998 04:00:00



: Hello, I hope this is the right place to post this.  Anyway, I am a
: Linux enthusiast that is still learning.  I installed RedHat5.0 on my
: P75.  I'm running apache and i want to be ablel to create a public_html
: directory in my /home/user directory so that I can go to a URL such as
: http://www.foo.com/~user  and get to my personal web site.  I checked
: the srm.conf file and it says that the UserDir is set to public_html.
: The error I get from my web browser is that permission is denied.  I
: have set the permissions on my public_html directory to 777, and have
: granted read access to my home directory.

OK.  For one thing, set your permissions to 755 for the home directory.
That's a LOT safer.  Now, be sure to change all the files in that
subdirectory (that you want to be seen) to 755 also.  Without that, Linux
still won't let you see them....

--
________________________________________________________________
          Patrick "I'm a graphical cheek ant" Geahan



 
 
 

Simple Apache Config Question

Post by David Wilbur » Sat, 17 Oct 1998 04:00:00




> : Hello, I hope this is the right place to post this.  Anyway, I am a
> : Linux enthusiast that is still learning.  I installed RedHat5.0 on my
> : P75.  I'm running apache and i want to be ablel to create a public_html
> : directory in my /home/user directory so that I can go to a URL such as
> : http://www.foo.com/~user  and get to my personal web site.  I checked
> : the srm.conf file and it says that the UserDir is set to public_html.
> : The error I get from my web browser is that permission is denied.  I
> : have set the permissions on my public_html directory to 777, and have
> : granted read access to my home directory.
> OK.  For one thing, set your permissions to 755 for the home directory.
> That's a LOT safer.  Now, be sure to change all the files in that
> subdirectory (that you want to be seen) to 755 also.  Without that, Linux
> still won't let you see them....

I definitely concur with the permissions change recommended above.  If
the permissions to your home directory and public_html directory are
both 755, and the permissions to the files in your public_html directory
are all 644, and it still doesn't work, check a few things.  First, make
sure that there is no .htaccess file in your public_html directory, or
if there is that it is correctly formatted.  Second, make sure that
there is a file called index.html in public_html.  Apache should be able
to do a directory listing index for you if index.html doesn't exist (at
least if you have it configured that way), but the configuration for
that is often goofy.  If it can't perform an index in that situation, it
will return a permission denied error message.  Personally, I think it
should return an internal server error message, but I didn't code it.
Anyways, look into that and see if that helps you if what Patrick said
doesn't.

--
* David Wilburn, a.k.a. "Bug"
* JMU Computer Science Student
* Boycott naugahyde!  Save the naugas!

 
 
 

Simple Apache Config Question

Post by Zhong Shen » Sun, 18 Oct 1998 04:00:00


You have to give the 755 to both your home directory and your public_html
directory.
Readable is enough for the files but not enough for directories.
 
 
 

Simple Apache Config Question

Post by Matthew T. O'Conno » Mon, 19 Oct 1998 04:00:00


Thank you all.  That got it going.  I didn't know that my home directory had to
be executable.

Matt O'Connor




> > : Hello, I hope this is the right place to post this.  Anyway, I am a
> > : Linux enthusiast that is still learning.  I installed RedHat5.0 on my
> > : P75.  I'm running apache and i want to be ablel to create a public_html
> > : directory in my /home/user directory so that I can go to a URL such as
> > : http://www.foo.com/~user  and get to my personal web site.  I checked
> > : the srm.conf file and it says that the UserDir is set to public_html.
> > : The error I get from my web browser is that permission is denied.  I
> > : have set the permissions on my public_html directory to 777, and have
> > : granted read access to my home directory.

> > OK.  For one thing, set your permissions to 755 for the home directory.
> > That's a LOT safer.  Now, be sure to change all the files in that
> > subdirectory (that you want to be seen) to 755 also.  Without that, Linux
> > still won't let you see them....

> I definitely concur with the permissions change recommended above.  If
> the permissions to your home directory and public_html directory are
> both 755, and the permissions to the files in your public_html directory
> are all 644, and it still doesn't work, check a few things.  First, make
> sure that there is no .htaccess file in your public_html directory, or
> if there is that it is correctly formatted.  Second, make sure that
> there is a file called index.html in public_html.  Apache should be able
> to do a directory listing index for you if index.html doesn't exist (at
> least if you have it configured that way), but the configuration for
> that is often goofy.  If it can't perform an index in that situation, it
> will return a permission denied error message.  Personally, I think it
> should return an internal server error message, but I didn't code it.
> Anyways, look into that and see if that helps you if what Patrick said
> doesn't.

> --
> * David Wilburn, a.k.a. "Bug"
> * JMU Computer Science Student
> * Boycott naugahyde!  Save the naugas!

 
 
 

1. Apache "allow/deny access by IP address" question (& other config questions...)

For the past two years, I have been running CERN's httpd, but have recently
begun to contemplate switching to Apache 1.05 (most recent non-beta release).
I've got the source code, have compiled it, and am now poring over the
documentation and configuration options.  Once I'm satisfied that Apache is
running well on the Solaris 2.4 box that it's on (serving a small document and
CGI tree for testing purposes), I want to turn the entire document/CGI set
from the CERN server over to the Apache server.
Before I can attempt to do this, I have a few questions:

The first has to do with restricting access to document and CGI trees based on
the browser's IP address.  With the CERN httpd, a few "protect" rules and a
few files containing "mask-group  <ip addr mask>,..." did the trick.
The Apache docs seem to offer little information about authentication, and
what's there seems to be focussed entirely on username/password schemes.

Secondly, unless I'm missing something in the docs, can I assume that I can't
do the equivalent of CERN's "pass" rules?  These let me map different document
trees (located anywhere in my machine's filesystems) to different URL paths.
Eg.  In my current CERN setup, all URLs of form www.lhsc.on.ca/ map to
/www/doc, but www.lhsc.on.ca/priv/ actually comes from /www/priv.  This allows
me to keep the file trees nice and separate, even if everything ends up in
one URL tree.  I'd prefer to avoid NOT having to use symlinks to get the job
done under Apache.

If these questions require more details, please let me know.  My typing
fingers are tired this morning, so I haven't included many here.

Thanks,

..Steve

--
Steve van der Burg
Technical Analyst, Information Services
London Health Sciences Centre
London, Ontario, Canada
Tel: +1 519 663-3300 x 5559

WWW: http://www.lhsc.on.ca/~vanderbg/

2. Need bzero, anint, dysize, timelocal for Solaris

3. newbie question about simple webserver config, install, setup

4. ipchains--why do localhost ports still show in nmap?

5. Simple CVSup config question.

6. HandheldPC/Hitachi SH-3 Port ?

7. a simple question about kernel config

8. Extract entries from file

9. Simple smail config question

10. SImple Config questions ;-)

11. Simple X config question

12. fetchmail config -- a simple question

13. Getty & Modem config -- Simple question!!!