search

Home  >  Q&A  >  body text

Problem that vhosts.confg information is not saved

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?

akram.arkinakram.arkin2621 days ago1172

reply all(2)I'll reply

  • Day

    Day2017-11-02 13:07:22

    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.

    reply
    0
  • 枫林断梦

    If you know how to do it, just create a new myvhosts file yourself and import it into nginx.conf!

    枫林断梦 · 2017-11-03 09:34:59
  • Cancelreply