Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Treat URL path as virtual host using Apache

The problem is that I have only one domain name on which three different products need to be run (two of them PHP based and one python). So I need to treat the path in the URL as a different virtual host; i.e.:

www.domain.com/first_URL/
www.domain.com/second_URL/
www.domain.com/third_URL/

Where the first to third will act as separate virtual hosts.

How can I do this?

like image 789
Ruslan Avatar asked Aug 01 '11 08:08

Ruslan


1 Answers

This can be achieved by using the Alias or AliasMatch directive:

Alias /first_url/ /var/www/first_url_resources

More details can be found in Apache Module mod_alias.

like image 122
x3c7 Avatar answered Nov 15 '22 17:11

x3c7