0
我已經以這種方式配置我的虛擬主機(apache2的):Symfony的生產路由問題
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /var/www/mysite.com/public_html/web
<Directory /var/www/mysite.com/public_html/web>
Require all granted
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
,我可以看到網頁和資產而不是其他途徑。
如果我改變文檔根目錄:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /var/www/mysite.com/public_html/web/app.php
<Directory /var/www/mysite.com/public_html/web/app.php>
Require all granted
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
現在我可以看到所有路線,但不是資產...
我怎樣才能設置虛擬主機看到所有路線和資產?
這個gonfig在windows上? –
在Ubuntu 16.04上 –
當您嘗試使用第一個配置訪問其他路由時會發生什麼? –