Ubuntu – Apache 500 error with no entries in error.log

apache-2.2ldapnetworkingsvnUbuntu

This is on a brand new Ubuntu 14.04 Server running a standard WAMP install with Apache DAV_SVN (using LDAP Authentication) added on top of it (mapped to /svn). I was able to get everything working correctly, and tested accessing subversion via HTTP and authenticating via LDAP and had no issues.

Then, I went into /etc/network/interfaces and changed it from DHCP to use a static IP address (so the DNS server can resolve the hostname for SVN). I performed a reboot on the server, and afterwards any attempt to access /svn result in a 500 error (AFTER providing ldap authentication credentials) – however accessing just / returns the default apache page correctly.

However, there is no record of a 500 error in error.log, so I have no way to debug what the error is. I'm not sure if the error is with communicating the credentials to LDAP, with SVN, Apache or what.


Update

I was able to confirm that going back to DHCP allows SVN to work again, however I need a static IP so I can use hostname routing for SVN – using a dynamic IP for a repository will create a management mess.

error.log

[Fri Feb 06 10:17:37.915182 2015] [mpm_prefork:notice] [pid 1090] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 10:17:37.915260 2015] [core:notice] [pid 1090] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 06 10:19:45.681937 2015] [mpm_prefork:notice] [pid 1090] AH00169: caught SIGTERM, shutting down
[Fri Feb 06 10:19:46.786369 2015] [mpm_prefork:notice] [pid 1987] AH00163: Apache/2.4.7 (Ubuntu) SVN/1.8.8 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 10:19:46.786434 2015] [core:notice] [pid 1987] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 06 10:19:48.285095 2015] [mpm_prefork:notice] [pid 1987] AH00169: caught SIGTERM, shutting down
[Fri Feb 06 10:19:49.398153 2015] [mpm_prefork:notice] [pid 2074] AH00163: Apache/2.4.7 (Ubuntu) SVN/1.8.8 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 10:19:49.398214 2015] [core:notice] [pid 2074] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 06 10:41:45.351303 2015] [mpm_prefork:notice] [pid 2074] AH00169: caught SIGTERM, shutting down
[Fri Feb 06 10:41:46.517131 2015] [mpm_prefork:notice] [pid 3665] AH00163: Apache/2.4.7 (Ubuntu) SVN/1.8.8 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 10:41:46.517209 2015] [core:notice] [pid 3665] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 06 10:42:41.050821 2015] [dav:error] [pid 3669] [client 192.168.12.162:59312] Could not fetch resource information.  [301, #0]
[Fri Feb 06 10:42:41.050932 2015] [dav:error] [pid 3669] [client 192.168.12.162:59312] Requests for a collection must have a trailing slash on the URI.  [301, #175002]
[Fri Feb 06 10:46:13.366128 2015] [mpm_prefork:notice] [pid 3665] AH00169: caught SIGTERM, shutting down
[Fri Feb 06 10:46:14.514782 2015] [mpm_prefork:notice] [pid 3738] AH00163: Apache/2.4.7 (Ubuntu) SVN/1.8.8 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 10:46:14.514837 2015] [core:notice] [pid 3738] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 06 10:56:37.258172 2015] [mpm_prefork:notice] [pid 3738] AH00169: caught SIGTERM, shutting down
[Fri Feb 06 11:09:35.552252 2015] [mpm_prefork:notice] [pid 1526] AH00163: Apache/2.4.7 (Ubuntu) SVN/1.8.8 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 11:09:35.558499 2015] [core:notice] [pid 1526] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 06 11:21:48.478383 2015] [mpm_prefork:notice] [pid 1526] AH00169: caught SIGTERM, shutting down
[Fri Feb 06 11:22:06.006478 2015] [mpm_prefork:notice] [pid 1067] AH00163: Apache/2.4.7 (Ubuntu) SVN/1.8.8 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 11:22:06.007231 2015] [core:notice] [pid 1067] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 06 11:41:32.208255 2015] [mpm_prefork:notice] [pid 1067] AH00169: caught SIGTERM, shutting down
[Fri Feb 06 11:41:33.396579 2015] [mpm_prefork:notice] [pid 1392] AH00163: Apache/2.4.7 (Ubuntu) SVN/1.8.8 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
[Fri Feb 06 11:41:33.396643 2015] [core:notice] [pid 1392] AH00094: Command line: '/usr/sbin/apache2'

enter image description here
enter image description here

Best Answer

There has been a similar question to yours already posted on Stackoverflow:

Internal Error 500 Apache

Firstly, as you have shown your port is alive and accepting users, however navigating to a subdirectory doesn't work.

I faced a similar issue on CentOS whereby the root worked http://somesite.com but when I went to http://somesite.com/xyz, it gave me a 500 error.

This was caused by a lack of permissions on the /xyz folder and that the .htaccess/httpd.conf file was not properly setup with:

<VirtualHost :80>
...
Insert your permissions here
</VirtualHost>

Or alternatively (provided you don't want public access to this and limit it to an IP of your choosing):

<Directory /xyz>
Options Follow Symlinks
Order deny, allow # If you want it to be public, use Order Allow, Deny; and
Deny from all #Allow from all
Allow from {IP of your choosing} #If Allow from all is present, this is line is not necessary. 
</Directory>

Mess around with your httpd.conf/.htaccess file, it's a permissions issue. :)

EDIT:

Also, make sure that if you use a database to serve content on /xyz, that the credentials the backend .php uses are correct, a database error can be hidden from the public view with a 500 internal error. (An easy way to check this is to: apt-get install lynx and then issue lynx http://127.0.0.1/svn)