I have installed laravel once before, and I can open the welcome page by directly accessing public under laravel.
This time I copied one from someone else, and after accessing public, the files under public are directly displayed, as shown below. What's going on? (Newbie, please explain in detail, thank you very much)
In case of nginx configuration problem, in your case, you should check whether your nginx server module index has index.php, and then check whether nginx is configured with php-fpm to process PHP files
Detailed reference:
https://laravel.com/docs/5.1
First, check whether you are accessing through the HTTP protocol. This situation usually occurs when accessing through the file: protocol.
Thank you for your answers. It is indeed a problem on the server side. Gundy's answer is Nginx's processing method. Mine is an apache server. The following paragraph is the result of Baidu.
Under the Apache directory, there is a conf directory. Open the "httpd" in it. .conf" file, find the DirectoryIndex section. Change it to DirectoryIndex index.php index.Html index.html In this way, the default homepage of your website directory is index.php. If there is no index.php, the system will automatically look for index.html , html is used as the default homepage.