lundi 29 février 2016

Apache with php on subdirectory of main site

My current configuration consists of this, where :8000 is a nodejs app with express.

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com

    Alias /old /var/www/php-site
    <Directory "/var/www/php-site">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>

    ProxyRequests on
    <Location />
        ProxyPass http://localhost:8000/
        ProxyPassReverse http://localhost:8000/
    </Location>

</VirtualHost>

How do I get this to work where /old directs to the old site? For some reason it wont recognize it. Or even better, how do I keep both at the "/" level where "/page" will go to the app with a matching directory. For instance, if php-site has the page /intro but the express site doesn't, it will pull the page from the php site. And if the express site has the page "/about" it will pull it from there?




Aucun commentaire:

Enregistrer un commentaire