Why does php not run from aliased directory

.htaccessaliasapache-2.2

I am trying to use nclud's windex to stylise my apache directory listings for an internal project (security isn't too much of a concern)

Windex uses a HeaderName and ReadmeName directive pointing to php files, and it all works so long as the windex php files are in the directory the VirtualHost is being served from.

However, I want to make a standard installation in /usr/share/windex for two reasons. The first is that I don't want the Windex folder to appear in the listings. The second is that I want to use it on more than one virtualhost then modify it for all.

So the .htaccess file stays in my /srv/www directory. In my httpd.conf for the virtualhost I specify an alias:

Alias /windex/ "/usr/share/windex"
<Directory "/windex">
    Options Indexes,FollowSymlinks
    AllowOveride All
    Order Allow,Deny
    Allow from all
</Directory>
<Directory "/usr/share/windex">
    Options Indexes,FollowSymlinks
    AllowOveride All
    Order Allow,Deny
    Allow from all
</Directory>

Now this works for the image and css files in /windex/icons/* and /windex/css/* all styles are applied correctly. However, the php files don't get processed. If, however I browse to the /windex/header.php file, the file is processed by PHP correctly.

Thanks
James

Best Answer

From Installation notes:

If you'd rather not have the windex folder sitting at the top of your site, you'll need to change the filepaths in config.php, all CSS files, and any .htaccess file derived from main.htaccess

Related Topic