Virtual Hosts in CentOS 7 + Laravel

匿名 (未验证) 提交于 2019-12-03 01:45:01

问题:

I have problems with my VirtualHosts

The Directory of the website is /var/www/html/laravel The httpd.conf file is

When open the website show me this error:

Somebody can help me? Thanks

回答1:

I found a Solution!

I have many sites in /var/www/html folder. www.example.com/site1 www.example.com/site2 ...

The solution is create one alias for each site in httpd.conf. example:

Alias /site1 /var/www/html/site1 <VirtualHost *:80>     DocumentRoot "/var/www/html/site1" </VirtualHost>  Alias /laravel /var/www/html/laravel/public <VirtualHost *:80>        DocumentRoot /var/www/html/laravel/public         <Directory /var/www/html/laravel>               AllowOverride All        </Directory> </VirtualHost>


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!