I think this is a simple question, but let me explain better. I have the following development environment:
- Ubuntu Server 12.04 LTS;
- Apache 2.4;
- PHP 5.5;
Everything is working fine, except the VirtualHost configuration. I want to deploy two applications: Drupal and Wordpress. Each application has your own directory, for example:
- Drupal: /l/disk0/drupal/public_html;
- Wordpress: /l/disk0/wordpress/public_html;
In default site, VirtualHost configuration points to /var/www as document root. I want to disable this default-site configuration and I want to create two VirtualHosts, one for Drupal and another one for Wordpress.
However, this is a development environment and there is no domain here. I've searched many sites and I found a lot of tutorials, all of them explains how to do this with domains, but not with subdirectories.
After doing the configuration, the URL to access my applications will be:
- http://example.com/wordpress; - http://example.com/drupal;
I already try with this VirtualHost:
<VirtualHost *:80> ServerName example.com ServerAdmin email@example.com DocumentRoot /l/disk0/site/public_html <Directory /> AllowOverride None </Directory> Alias /site /l/disk0/site/public_html <Directory /l/disk0/site/public_html> Options MultiViews Indexes Includes FollowSymLinks ExecCGI AllowOverride All Require all granted allow from all </Directory> RewriteEngine On LogLevel warn ErrorLog "/l/disk0/site/logs/apache/site/error.log" CustomLog "/l/disk0/site/logs/apache/site/access.log" combined SSLProxyEngine on </VirtualHost>