We have a Sinatra app running in the domain root via passenger such as http://rootdomain.com/
We have some PHP pages we would like to serve in a subdirectory like so: http://rootdomain.com/example
The Sinatra app lives in a folder /var/webapps/homepage
which is deployed to via mina/git.
Ideally, we would then place our PHP scripts in /var/www/example
and have these pages served by Apache.
The method by which I am trying to do this is via Apache aliases:
httpd.conf
Alias /example/ /var/www/example
Alias /example /var/www/example
However, anything other than http://rootdomain.com/example/index.php
returns a 404 (for example: http://rootdomain.com/example or http://rootdomain.com/example/`
My httpd.conf has a directive like so:
<Directory /var/www/example>
Options All
AllowOverride All
order allow,deny
allow from all
DirectoryIndex index.html index.php
</Directory>
A solution was found here:
https://serverfault.com/questions/530958/apache2-with-passenger-and-subdirectory-with-file-listing
Which is incredibly and simply disabling Passenger for the specified folder, so as in the case above it would be:
<Location /var/www/example/>
PassengerEnabled off
</Location>
Within the <virtualhost>...</virtualhost>
block.