Мне нужно обслуживать разные проекты в разных подпапках, используя один и тот же порт с Apache2. Например,
- Проект1 -> http://IP
- Проект2 -> http://IP/project2
Я пробовал эту конфигурацию, но она не работает.
<VirtualHost *:80>
ServerName http://XXXX/project1
DocumentRoot /usr/share/srv/html
<Directory "/usr/share/srv/html">
DirectoryIndex index.html
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName http://XXXXXX
ServerAdmin admin@example.com
DocumentRoot "/var/www/projectroot"
<Directory "/var/www/projectroot/">
DirectoryIndex index.php index.html
Options FollowSymLinks
AllowOverride All
Options MultiViews FollowSymlinks
</Directory>
</VirtualHost>
Как мне этого добиться?