Configure Apache .conf for Alias

So I cant get an alias working in "/etc/httpd/conf.d/vhosts.conf" which contains all of my virtual hosts:
<VirtualHost *> 
    ServerName example.com
    Alias /ncn /var/www/html/ncn
    DocumentRoot /var/www/html/mjp
</VirtualHost>
I want my alias to work so I can point example.com/ncn to "/var/www/html/ncn".
This works if I have it in "/etc/httpd/conf/httpd.conf" but not my "/etc/httpd/conf.d/vhosts.conf"
Any ideas why? Everything else seems to work i.e. ServerAlias's
Cheers, Peter
<VirtualHost *> 
    ServerName example.com
    DocumentRoot /var/www/html/mjp

    Alias /ncn "/var/www/html/ncn"

    <Directory "/var/www/html/ncn">
        Options None
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Source: https://stackoverflow.com

Comments

Popular Posts