I have several projects on Linux-Servers which I work on locally with my Windows xampp enviroment. However, the apache directory (Virtual Host) settings are like this on all projects:
DocumentRoot /var/www/html/project1/web
<Directory /var/www/html/project1/web/>
AllowOverride All
Order Allow,Deny
Allow from All
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</Directory>
Now I can use absolute paths in my source such as /images/
When I create a Directory in the xampp httpd.conf like this, it works, but only for the project I have the document root specified for:
DocumentRoot "C:/xampp/htdocs/project1/web"
<Directory "C:/xampp/htdocs/project1/web">
....
</Directory>
I would like to work on project2
as well but I also want the /images/
path to work in p2 as well, so changing the DocumentRoot
to htdocs
does not work. I also tried Alias
but to no avail.
Where am I wrong, how do other people work on multiple projects, do they update the https.conf every time the switch projects?