Laravel: Set up Laravel vhost

梦想的初衷 提交于 2019-12-25 02:29:42

问题


Hi so I'm setting up Laravel, but it keeps redirecting to the "Whoops something went wrong page"

    <VirtualHost *:80>
     DocumentRoot "C:/xampp/htdocs/myfolder/public"
     ServerName ron@gmail.com
     ServerAlias l1.mysite.com
     <Directory "C:/xampp/htdocs/laravel/laravel/public">
     AllowOverride All
     Order Allow,Deny
     Allow from all
     Require all granted
     </Directory>
    </VirtualHost>

I have the l1.mysite.com in my hosts file as well. And in my httpd.conf file, "LoadModule rewrite_module modules/mod_rewrite.so" is included (without #) and my httpd-vhosts.conf is included as well. Any help is appreciated thanks.


回答1:


If you're getting Whoops: Something went wrong, that means PHP is actually doing it's thing correctly, and your vhost might not be the issue. What's the error message you get?

You likely need to:

  1. Make sure you've installed dependencies (as noted in comments composer install or composer update
  2. Ensure app/storage directory (and sub directories) are writable by PHP.



回答2:


Set debug in your app.php to true that is open app/config/app.php and change the value of debug => true. You would have an idea what's really wrong.



来源:https://stackoverflow.com/questions/21338126/laravel-set-up-laravel-vhost

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