logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Configuration Error is causing an Internal Server Error
Author
mischaadj



Joined: 10 Oct 2012
Posts: 3
Location: Germany

PostPosted: Wed 10 Oct '12 20:57    Post subject: Configuration Error is causing an Internal Server Error Reply with quote

Dear community,

first of all some basic informations:

- Apache version : 2.2.21
- operating system : MAC OS Lion Server
- mod_ssl : 2.2.21


I have a certain area on a homepage which is protected by an .htaccess file.

The code of the .htaccess file is the following:

Code:
AuthType Digest
AuthName "Password Required"
Options +Indexes
# code for HTTPS
RewriteEngine On
RewriteCond
%{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI}
Require valid-user


Usually everything has been working fine with the help of this .htaccess-file until today. There hasn't been any change on the system.

If you click on the hyperlink to the restricted area the login window appears where you need to type in your username and a password. After typing in these data the following message appears in the browser:

500 Internal Server Error

The server encountered an internal error or
misconfigruation and was unable to complete your request. (…)


The apache error log file contains the following message:

Request exceeded the
limit of 10 sub request nesting levels due to probable configuration
error. Use 'LimitInternalRecursion' to increase the limit if necessary.
Use 'LogLevel debug' to get a backtrace.


The increase of the LimitInternalRecursion does not solve the problem.
So I switched the LogLevel in the httpd.conf file from warn to debug and looked again on the entries
of the error log.

The following appeared (I have replaced ip addresses, usernames and URL by xyz or <URL>) :
Code:

[error] [client xyz]
mod_digest_apple: Client is using a nonce not issued by this server for this context:/rb/Vorlesung/WS12/Downloads/, referer:
http:<URL>


[Wed Oct 10 15:42:29 2012] [debug] mod_digest_apple2.c(386): [client xyz] mod_digest_apple: check_nonce:
prefix=07fd72a9fc0507fd72a8076a87fff686fdf3a7fd72aa50
nonce=5054dcfaa14d7f7f35aad4f1f16aae62134987654329174
timestamp=1349876543291774, referer:
<URL>


[Wed Oct 10 15:42:29 2012] [debug] mod_digest_apple2.c(401): [client xyz] mod_digest_apple: check_nonce: comparing
md5=5054dcfaa14d7f7f35aad4f1f16aae62 and
nonce=5054dcfaa14d7f7f35aad4f1f16aae62134987654329174 , referer:<URL>


[Wed Oct 10 15:42:29 2012] [info] [client xyz] mod_digest_apple:
Successfully authenticated user "xyz" for realm "Password Required" for
URI "/rb/Vorlesung/WS12/Downloads/" resp->uri
"/rb/Vorlesung/WS12/Downloads/" from the directory., referer:
<URL>


[Wed Oct 10 15:42:29 2012] [debug] mod_auth_apple2.c(591): [client
xyz] mod_auth_apple: Declining non-basic auth_type, referer:
<URL>


[Wed Oct 10 15:42:29 2012] [info] [client xyz] mod_digest_apple:
Authorized valid-user xyz uri /rb/Vorlesung/WS12/Downloads/, referer:
<URL>


[Wed Oct 10 15:42:29 2012] [debug] mod_hfs_apple2.c(143): [client
xyz] mod_hfs_apple: /usr/share/web/ is case-insensitive, referer:
<URL>


[Wed Oct 10 15:42:29 2012] [debug] mod_hfs_apple2.c(143): [client
xyz] mod_hfs_apple: /Library/WebServer/CGI-Executables/ is
case-insensitive, referer:
<URL>


Since I am not very familiar with Apache2 and the web
administration is not my main job I am asking if anyone here has an idea how to fix this problem.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Thu 11 Oct '12 20:33    Post subject: Reply with quote

You can increase LimitInternalRecursion
Since 10 is the default number, choose a higher one until it works (don't forget to restart apache after changing the config before testing)
Back to top
mischaadj



Joined: 10 Oct 2012
Posts: 3
Location: Germany

PostPosted: Fri 12 Oct '12 16:03    Post subject: Reply with quote

The increase of the directive LimitInternalRecursion does not solve the problem as I have mentioned above.

If one enters the correct username + password and a html file like index.html is in the folder everythings works.
The problem is that the directory structure isn't shown. The order Options +Indexes does not work.
So it seems that the execution of the Options directive is blocked.

I have checked if the directive AllowOverrides are set to All in each file of the path /etc/apache2/sites
where the configurations for the websites are stored.
Code:

 <Directory "/Library/Server/Web/Data/Sites/Default">
                Options All +MultiViews -ExecCGI -Indexes
                AllowOverride All
                <IfModule mod_dav.c>
                        DAV Off
                </IfModule>
        </Directory>

What could be the reason that the Options directive in the .htacces-file does not work?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Mon 15 Oct '12 22:56    Post subject: Reply with quote

Since there is AllowOverride All you should check that directory for .htaccess files. Or just try AllowOverride None. Of cause the options should be Options All +MultiViews -ExecCGI
Back to top


Reply to topic   Topic: Configuration Error is causing an Internal Server Error View previous topic :: View next topic
Post new topic   Forum Index -> Apache