用vagrant 配置了环境,但是死活都是‘file not found’
vagrant版本
<code>Vagrant 1.6.5 </code>
目录权限是
立即学习“PHP免费学习笔记(深入)”;
<code>drwxr-xr-x 1 vagrant vagrant </code>
nginx 报错信息
<code>[error] 2186#0: *32 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.33.1, server: xxx.xxx.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:" </code>
nginx配置
<code> server {
listen 80; ## listen for ipv4; this line is default and implied
server_name xxx.xxx.com;
root /vagrant/demo;
index index.php;
# Make site accessible from http://localhost/
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
</code>网上的都试过了,还是不行。
用vagrant 配置了环境,但是死活都是‘file not found’
vagrant版本
<code>Vagrant 1.6.5 </code>
目录权限是
立即学习“PHP免费学习笔记(深入)”;
<code>drwxr-xr-x 1 vagrant vagrant </code>
nginx 报错信息
<code>[error] 2186#0: *32 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.33.1, server: xxx.xxx.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:" </code>
nginx配置
<code> server {
listen 80; ## listen for ipv4; this line is default and implied
server_name xxx.xxx.com;
root /vagrant/demo;
index index.php;
# Make site accessible from http://localhost/
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
</code>网上的都试过了,还是不行。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号