Hi Everybody, I'm getting Apache Error 403 'Access Forbidden' when I point my browser to some pages I'm working on in my ~/public_html/ directory. "http://localhost/" automagically opens /srv/www/htdocs/index.html.en and, if I follow the 'documentation' link there, I can access the installed Apache2 documentation. However, "http://localhost/~carlh/anyname.html" results in Error 403 It seems I must be too close to the problem and frustrated now and am probably overlooking something simple. Here's my config: Permissions: ======= /home/carlh/public_html/ drwxr-xr-x 7 carlh users /home/carlh/public_html/*.html -rw-r--r-- 1 carlh users /home/carlh/public_html/images drwxr-xr-x 5 carlh users From mod_userdir.conf: ============= ... # not every user's directory should be visible: #UserDir disabled root # to enable UserDir only for a certain set of users, use this instead: UserDir disabled UserDir enabled carlh # the UserDir directive is actually used inside the virtual hosts, to # have more control UserDir public_html <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec +Includes <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept> </Directory> From mod_mime-defaults.conf (enabling SSIs): =========================== ... # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # AddType text/html .shtml AddOutputFilter INCLUDES .shtml From /etc/sysconfig/apache2: ================= ... # your settings APACHE_MODULES="access actions alias autoindex cgi dir include log_config mime negotiation setenvif status userdir asis imap info php4 perl ruby" What am I doing wrong here? I think I'm too close and frustrated now, so I must be overlooking something! TIA & regards, - Carl
On Tue, Sep 20, 2005 at 07:44:20AM -0400, Carl Hartung wrote:
Hi Everybody,
I'm getting Apache Error 403 'Access Forbidden' when I point my browser to some pages I'm working on in my ~/public_html/ directory.
"http://localhost/" automagically opens /srv/www/htdocs/index.html.en and, if I follow the 'documentation' link there, I can access the installed Apache2 documentation.
However, "http://localhost/~carlh/anyname.html" results in Error 403
It seems I must be too close to the problem and frustrated now and am probably overlooking something simple. Here's my config:
Permissions: ======= /home/carlh/public_html/ drwxr-xr-x 7 carlh users /home/carlh/public_html/*.html -rw-r--r-- 1 carlh users /home/carlh/public_html/images drwxr-xr-x 5 carlh users
How are permissions for /home/carlh/? Robert -- Robert Schiele Tel.: +49-621-181-2214 Dipl.-Wirtsch.informatiker mailto:rschiele@uni-mannheim.de
On Tuesday 20 September 2005 08:16, Robert Schiele wrote:
How are permissions for /home/carlh/?
Robert
Hi Robert, Here's for /home/carlh drwxr-xr-x 44 carlh users 2240 2005-09-20 08:39 carlh/ I appreciate you looking at this... my eyes are fatiguing X-0 - Carl
On Tue, Sep 20, 2005 at 08:43:37AM -0400, Carl Hartung wrote:
On Tuesday 20 September 2005 08:16, Robert Schiele wrote:
How are permissions for /home/carlh/?
Robert
Hi Robert,
Here's for /home/carlh
drwxr-xr-x 44 carlh users 2240 2005-09-20 08:39 carlh/
Hmm, that's obviously ok. Then it must be something with the Apache configuration itself. Do you have some limits or AllowOverride set for a higher level than public_html? (Note that I currently don't know what's the problem here. This is just a wild guess.) Robert -- Robert Schiele Tel.: +49-621-181-2214 Dipl.-Wirtsch.informatiker mailto:rschiele@uni-mannheim.de
On Tuesday 20 September 2005 09:01, Robert Schiele wrote:
Hmm, that's obviously ok. Then it must be something with the Apache configuration itself.
Do you have some limits or AllowOverride set for a higher level than public_html? (Note that I currently don't know what's the problem here. This is just a wild guess.)
Is this relevant? from /etc/apache2/httpd.conf: ================= # forbid access to the entire filesystem by default <Directory /> Options None AllowOverride None Order deny,allow Deny from all </Directory> # use .htaccess files for overriding, AccessFileName .htaccess # and never show them <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> - Carl
Hello, Am Dienstag, 20. September 2005 15:18 schrieb Carl Hartung:
On Tuesday 20 September 2005 09:01, Robert Schiele wrote:
Do you have some limits or AllowOverride set for a higher level than public_html? (Note that I currently don't know what's the problem here. This is just a wild guess.)
Is this relevant? <Directory />
I don't think so because the settings for public_html (in general: the more specific context settings) have a higher priority. Please have a look in your Apache error_log - if you are lucky, you'll see the reason of the problem there. Regards, Christian Boltz -- Lass es mich so ausdrücken, Du hast einem mutmaßlichen Anfänger auf die Frage "Wie lasse ich ein Auto an?", mit einer Erklärung wie er die Zündung kurzschließt geantwortet :-) [Ralf Corsepius in suse-programming]
On Tuesday 20 September 2005 18:06, Christian Boltz wrote:
Hello, <snip> Please have a look in your Apache error_log - if you are lucky, you'll see the reason of the problem there.
Thanks Christian, I guess you sent this off before reading my [SOLVED] post? The entire UserDir section was missing from /etc/apache2/default-server.conf. It's all better now. regards, - Carl
On Tuesday 20 September 2005 07:44, Carl Hartung wrote: <snipped> Thanks Robert, I found the problem. The default Apache2 installation on 10.0 RC1 omitted the section, below, from /etc/apache2/default-server.conf. When I inserted it and restarted Apache2, my ~/public_html directory became available. - Carl -- excerpt -- # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. # # To disable it, simply remove userdir from the list of modules in APACHE_MODULES # in /etc/sysconfig/apache2. # <IfModule mod_userdir.c> # Note that the name of the user directory ("public_html") cannot simply be # changed here, since it is a compile time setting. The apache package # would have to be rebuilt. You could work around by deleting # /usr/sbin/suexec, but then all scripts from the directories would be # executed with the UID of the webserver. UserDir public_html # The actual configuration of the directory is in # /etc/apache2/mod_userdir.conf. Include /etc/apache2/mod_userdir.conf # You can, however, change the ~ if you find it awkward, by mapping e.g. # http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/ #AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2 </IfModule> -- end excerpt --
participants (3)
-
Carl Hartung
-
Christian Boltz
-
Robert Schiele