windows system phpstudy integrated environment, nginx service, after the installation of laravel, except the home page can be accessed, the registration and login pages after make:auth can not be accessed. To find the reason on the Internet, just write index.php after the domain name, and then know that it is the problem of pathinfo. Add a line to the vhosts.conf file of nginx according to the instructions of the document
.try_files $uri $uri/ /index.php?$query_string;
this is the content of my vhost.conf configuration file, and nothing else has been moved except for the above line:
server {
listen 80;
server_name laravel.demo.com ;
root "E:/pms/laravel/public";
location / {
index index.html index.htm index.php;
-sharpautoindex on;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
now the address automatically adds index.php, but according to the document, adding the try_files line is to beautify the url, but it automatically adds the index.php. How to hide the index.php?? I checked on the Internet, and the configuration file is written by default, ask for help from the boss, see where the problem is?