php - Two symfony projects on one server/domain -
i've created 2 independent symfony projects , i've moved them prod server, example:
project1.example.com [/var/www/project1/web] project2.example.com [/var/www/project2/web]
the problem when open second address, project1
fired up. checked /var/www/project2/web/app.php
, seems it's executed, reason, symfony loaders use /var/www/project1/
path. of course cache folders cleared.
any ideas how diagnose problem?
update
apache config files:
/etc/apache2/apache2.conf
/etc/apache2/sites-enabled/project1.conf + /etc/apache2/sites-enabled/project2.conf
update 2
strange thing, morning situation has reversed. both addresses show site project2
now. no config nor project files modified.
you'll need enable virtual hosting in apache.
take @ article on it, should answer question:
https://alvinbunk.wordpress.com/2016/11/21/apache-httpd-virtualhost-config/
if need further that, can post question. use time.
edit #2 - based on apache 2 conf:
suggest combine ssl , http virtualhost ports so, , have single directory
directive web folder. there other redundancies in conf file. please read documents first apache config files before asking questions.
<virtualhost *:443 *:80> ... <directory /var/www/project1/web> options indexes followsymlinks multiviews allowoverride order allow,deny allow </directory> ... </virtualhost>
for project2 problem, have checked logs in $apache_log_dir see show? think logs in /var/log
; there's httpd
subdirectory httpd logs. need make sure there incoming request project1.example.com.pl
. if not, you'll need check hosts
files see setup correctly.
Comments
Post a Comment