Hello, everyone,
I'm attempting to display PHP source code with syntax-highlighting on a development server -- but only for a certain location within Apache's document root. This particular location happens to be a SVN repository that is powered with the mod_dav_svn module for Apache.
The problem I'm having is that PHP source code display and syntax-highlighting seems to function as expected, but not for the one directory in which I'd like it to function.
The following snippet in my httpd.conf file does indeed cause all code, EXCEPT for that within the /svn directory, to be displayed as PHP source, syntax-highlighting intact:
<Location />
RemoveHandler .php
RemoveType .php
AddHandler php5-script .php
AddType application/x-httpd-php-source .php
ForceType application/x-httpd-php-source
</Location>
However, if I try to change the opening tag from <Location /> to <Location /svn>, the code that is normally displayed in black plaintext (i.e., SVN browser output with no fancy styling) is not displayed. Rather, I am prompted to download the .php file as an Application.
Please note that I want .php files to be displayed as source; not .phps files (the default extension for source). The reason for this is that it is a code repository; working copies of .php files should be displayed as source.
I thought that the following code would work, but it does not (I am prompted to download files within the domain's /svn directory, instead of being able to see their source):
<Location /svn>
DAV svn
SVNPath /var/www/vhosts/domain.com/svnrepo
#SVNIndexXSLT "/svnindex.xsl"
Require valid-user
AuthzSVNAccessFile /var/www/vhosts/domain.com/commit-access-control.cfg
RemoveHandler .php
RemoveType .php
AddHandler php5-script .php
AddType application/x-httpd-php-source .php
ForceType application/x-httpd-php-source
</Location>
It seems like the mod_dav_svn module may be interfering with Apache's normal procedure for displaying syntax-highlighted PHP source code.
Has anybody attempting this and had success? If so, what am I doing incorrectly?
Thanks for any help!