2

I want to create site in the same IP but with different sub folder, for example:
http://192.168.0.1/a/ --> /var/www/site_a/
http://192.168.0.1/b/ --> /var/www/site_b/

The config:

<VirtualHost *:80>
    #Site name
    ServerName 192.168.0.1

    #Root folder
    DocumentRoot /var/www/site_a/

    #log
    ErrorLog /var/www/binapk/logs/error.log

    #Access log
    CustomLog /var/www/binapk/logs/access.log combined

    Alias /a /var/www/site_a/
    Alias /b /var/www/site_b/
</VirtualHost>

But if you enter http://192.168.0.1 (without /a or /b), it will show the same page as http://192.168.0.1/a/, I want http://192.168.0.1/ is nothing show up.

How to do that?

Awin
  • 139
  • 2
  • 9

1 Answers1

0

The few lines that you have specifying the DocumentRoot:

#Root folder
DocumentRoot /var/www/site_a/

are pointing your http://192.169.0.1/ to the /a folder, you would want to point it at something else in order to have it load a different document.

Bob620
  • 28
  • 5