Apache under Virtual Host Configuration Laravel project without error prompt

Source: Internet
Author: User

First of all php.ini , I turned on the error prompt by viewing the phpinfo() error prompt that you can see is turned on, but when I Laravel configure a virtual host, Laravel in this project directory, the view is found

You can see that the Off information is through the query, the right refers to the On configuration is php.ini already configured On and at this point Off is Local Value , and then query the data said there may be .htaccess a problem with the configuration, the following is Laravel the default configuration


  
       
   
    
     
            Options -MultiViews    
   
        RewriteEngine On    # Redirect Trailing Slashes If Not A Folder...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteRule ^(.*)/$ /$1 [L,R=301]    # Handle Front Controller...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^ index.php [L]    # Handle Authorization Header    RewriteCond %{HTTP:Authorization} .    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
   

And at the same time, if I use it, I php artisan serve can see the error message.
Similar to this

Of course I do know the error above, but it is the same after the configured virtual domain name

And when I configure a virtual host for other non- Laravel projects, I can correctly display the error message, my

APP_ENV=localAPP_DEBUG=true

is also open.
What is the cause of this?

Reply content:

First of all php.ini , I turned on the error prompt by viewing the phpinfo() error prompt that you can see is turned on, but when I Laravel configure a virtual host, Laravel in this project directory, the view is found

You can see that the Off information is through the query, the right refers to the On configuration is php.ini already configured On and at this point Off is Local Value , and then query the data said there may be .htaccess a problem with the configuration, the following is Laravel the default configuration


  
       
   
    
     
            Options -MultiViews    
   
        RewriteEngine On    # Redirect Trailing Slashes If Not A Folder...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteRule ^(.*)/$ /$1 [L,R=301]    # Handle Front Controller...    RewriteCond %{REQUEST_FILENAME} !-d    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^ index.php [L]    # Handle Authorization Header    RewriteCond %{HTTP:Authorization} .    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
   

And at the same time, if I use it, I php artisan serve can see the error message.
Similar to this

Of course I do know the error above, but it is the same after the configured virtual domain name

And when I configure a virtual host for other non- Laravel projects, I can correctly display the error message, my

APP_ENV=localAPP_DEBUG=true

is also open.
What is the cause of this?

If it is Linux, there may be a problem with log file permissions.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.