I am developing the laravel framework and defined routing in vhosts
server { listen 8080; server_name localhost localhost; root "E:\web\php\TS_PLUS\public"; location / { try_files $uri $uri/ /index.php?$query_string; index index.html index.htm index.php; #autoindex on; } 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; } }
Added this line of routing code
try_files $uri $uri/ /index.php?$query_string;
The problem is that phpstady does not have this line of routing configuration every time the computer restarts . What's the solution?
phpStudy reads the virtual domain name site according to a fixed format, which is the domain name, path, second-level domain name, and port. The information you configure yourself cannot be recognized by the software. It is suitable for novices to configure the site in a fool-proof way, and weak countries are familiar with configuring Vhost. If you want to configure the file, please configure it manually instead of using software, because manual configuration that does not follow the fixed format will cause Nginx to fail to start.