Home > PHP Framework > Laravel > body text

Why does the laravel framework report a 403 error?

WBOY
Release: 2022-06-07 15:50:02
Original
2752 people have browsed it

In laravel, because the project root directory does not point to the public directory during configuration parsing, a 403 error will appear in the project; just set the path of the running directory or root directory to the public directory in the project directory. Solve the problem of 403 error.

Why does the laravel framework report a 403 error?

#The operating environment of this article: Windows 10 system, Laravel version 6, Dell G3 computer.

Why does laravel framework report a 403 error

Cause: The project root directory does not point to the public directory,

I forgot to specify the public directory when configuring parsing

Why does the laravel framework report a 403 error?

The most likely reason is that your website root directory is not set to public

Just set it in the website configuration

Why does the laravel framework report a 403 error?

Why does the laravel framework report a 403 error?

Extended knowledge:

Create a virtual host in vhost.conf, the root directory is the laveral public directory


     ServerName laravelht.vn
     DocumentRoot  C:/phpStudy/PHPTutorial/WWW/asd/laravel/public
     SetEnv APPLICATION_ENV "development"
     
         DirectoryIndex index.php
         AllowOverride All
         Require all granted
         Order allow,deny
         Allow from all
     
 
Copy after login

[Related recommendations: laravel video tutorial

The above is the detailed content of Why does the laravel framework report a 403 error?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!