On nginx thinkphp project deployed in the phpstudy

Friends of thinkphp do a project, let me help him look the deployment, LINUX server, with pagoda.

The first server, install the pagoda, pagoda and filled NGINX, PHP5.6, and then create a site binding domain, a successful visit, everything is normal!

Yesterday try to another server installed on the same, pagoda, NGINX, PHP5.6, build websites, binding domain, the result of wrong time of the visit, 404 errors,

Search pages, found that as long hook into the pagoda in the website set up in the anti-cross-site attacks that remove the hook like, I do not know why the first server is not on the hook, this server is on the hook. .

 

The whole project to get local, local WIN10, fitted PHPSTUDY, with the default PHP5.6 + APAXCHE, site management to create a new domain name, port 8001

Local open a browser to access: http: // localhost: 8001 visit the website normal

PHPSTUDY in switching to NGINX + PHP5.6, also the site of the establishment of a domain name, port 8001, the result of a mistake at the time of the visit, no matter which page views are given:

 

No input file specified

 

Search the Internet for a day, finally found the articles I can solve the problem. .

https://blog.csdn.net/weixin_37281289/article/details/88621487

View C: \ phpStudy \ PHPTutorial \ nginx \ logs \ error.log file, errors are found:

My website directory is c: \ temp \ daochiphp, the original NGINX \ t to escape, and enter:

C:\phpStudy\PHPTutorial\nginx\conf\vhosts.conf

Into c: \\ temp just fine

Then browse http: // localhost: 8001 .... another successful show error ...

 

They are used in thinkphp, the local test, then had to add index.php

 

If you want to not need to enter index.php then have to change vhost.conf file, in addition to almost forget, but also to the site's configuration file plus those things that pagoda

    location / {
        if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php?s=$1 last;
        break;
        }
    }

Guess you like

Origin www.cnblogs.com/niunan/p/10966732.html