I am using apache vhosts for SSL sites. In the vhost definition, I specify that I want the error log sent to syslog with "ErrorLog syslog:local1"
This works fine whenever you hit a page inside the DocRoot of the vhost. But when you hit a page that is a symlink from the DocRoot to some other part of the filesystem, apache creates a "syslog:local1" text file in the target dir instead of actually logging through syslog. I don't understand why. I can't seem to find a bug report for this behavior, but I don't see anyone else report this problem and I don't know what is wrong with my config.
<VirtualHost 10.1.7.1:443> FileETag MTime Size ServerAdmin email@example.com Serverrrme www.website.com ServerAlias *.www.website.com DocumentRoot /var/www/website/html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/var/www/website/html"> Options -Indexes FollowSymLinks MultiViews AllowOverride FileInfo Options AuthConfig Order allow,deny allow from all </Directory> ErrorLog syslog:local1 LogLevel warn SSLEngine on SSLCertificateFile /etc/ssl/certs/website.crt SSLCertificateKeyFile /etc/ssl/private/website.key SSLCertificateChainFile /etc/ssl/certs/ca.crt <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 # MSIE 7 and newer should be able to use keepalive BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown </VirtualHost>
index.php scripts/ -> /usr/local/share/stuff/scripts
"scripts" is a symlink outside of the docroot. I can access the file "www.website.com/scripts/test.php" no problem with a browser. The problem is the logging. In this set up, if I hit "www.website.com/scripts/test.php", Apache doesn't log it to syslog the way I have it configured in the vhost. Instead, Apache creates "/usr/local/share/stuff/scripts/syslog:local1" as a file and logs it there. But if I hit "www.website.com/index.php" it logs the way it is supposed to.
System info: Server version: Apache/2.2.22 (Ubuntu) Ubuntu 12.04.2