Problem that vhosts.confg information is not saved
akram.arkin
akram.arkin 2017-11-02 10:33:16
0
2
1136

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.arkin
akram.arkin

reply all(1)
Day

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 If you know how to do it, just create a new myvhosts file yourself and import it into nginx.conf!
    枫林断梦 author 2017-11-03 09:34:59
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template