I am attempting to configure my local Apache2 server to host several Symfony websites using virtual hosts, however i cannot reach alias
lib/vendor/symfony/data/web/sf directory as
/sf. I observe that using %1 and %2 in alias statement may be the supply of the issue, however i can't find the correct solution. I put into /etc/hosts entry
127.0.0.1 jobeet.sandbox.sfdevel, I produced during my home directory directory
~/Projekty/sandbox/jobeet. My Apache2 site configuration reads the following:
<VirtualHost *:80> ServerName localhost ServerAlias *.sfdevel VirtualDocumentRoot /home/alef/Projekty/%2/%1/web <Directory /home/alef/Projekty/%2/%1/web> AllowOverride All Allow from All </Directory> Alias /sf /home/alef/Projekty/%2/%1/lib/vendor/symfony/data/web/sf <Directory /home/alef/Projekty/%2/%1/lib/vendor/symfony/data/web/sf> AllowOverride All Allow from All </Directory> ErrorLog /var/log/apache2/sfdevel_error.log LogLevel warn CustomLog /var/log/apache2/sfdevel_access.log combined </VirtualHost>
After I change
/home/alef/Projekty/sandbox/jobeet/lib/vendor/symfony/data/web/sf it really works all right, but I wish to use several separate Symfony websites. What changes must i use in my Apache2 configuration?
I am unsure if you're able to create aliases by doing this. There is nothing about this within the apache documentation.
I'd consider getting rid of Alias out of your virtualhost definition anyway. Symbolic link works exactly the same:
cd /home/alef/Projekty/sandbox/jobeet/web ln -s ../lib/vendor/symfony/data/web/sf