php解析为空白
军哥好我建了一个二级域名用来放phpmyadmin,现在的问题是图片都可以解析访问,php页面显示404访问二级域名就直接空白,查看源文件可以看到页面有内容,但是就是显示不了
同一个vps的其他网站都正常。能给个方向么
谢谢。 发该虚拟主机的配置文件看看 我在里面随便建了一个phpinfo文件可以正常解析
该主机配置文件如下
log_formattest.example'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
{
listen 80;
server_name test.example;
index index.php;
root/home/wwwroot/test.example;
include other.conf;
location ~ .*\.(php|php5)?$
{
try_files $uri =404;
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_paramSCRIPT_FILENAME /home/wwwroot/test.example$fastcgi_script_name;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log/home/wwwlogs/test.example.com.logtest.example.com;
} 把你自己加的fastcgi_paramSCRIPT_FILENAME /home/wwwroot/test.example$fastcgi_script_name; 删掉,重启nginx 已经删除,昨天是我找资料找的办法,加上去也不行,才来发帖子询问了
现在删除了还是不行。。 要不要升级下nginx试试,现在还是1.0默认版本
看最新的已经是1.4.4了 已升级为最新的1.4.4 删除后该虚拟主机的nginx配置就没问题了,还改其他配置了没,你的是什么程序,添加时报错了没? 自己基于mvc框架开发的我把nginx.conf配置发上来看看自己的站运行的正常,但是phpmyadmin就不行,最新版的。权限应该没问题吧都是git目录的php.ini当初改了一部分..
usergit git;
worker_processes 1;
error_log/home/wwwlogs/nginx_error.logcrit;
pid /usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
}
http
{
include mime.types;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
fastcgi_intercept_errors on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 1300;
fastcgi_send_timeout 1300;
fastcgi_read_timeout 1300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
gzip on;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE \.";
#limit_zonecrawler$binary_remote_addr10m;
server_tokens off;
#log format
log_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
listen 80;
server_name example;
index index.php;
root/home/wwwroot/default;
# location ~ .*\.(php|php5)?$
# {
# try_files $uri =404;
# fastcgi_passunix:/tmp/php-cgi.sock;
# fastcgi_index index.php;
# include fcgi.conf;
# }
location /status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log/home/wwwlogs/access.logaccess;
}
include vhost/*.conf;
} 你配置文件改了好几个地方
phpmyadmin在默认的虚拟主机目录,你把php的解析去掉了,phpmyadmin也就没法用了,默认的配置只要安装成功了,肯定不会有问题 是的,军哥,改了不少地方
最早时候刚装好1.0的时候,默认的default的phpmyadmin是可以运行的
自己开发的系统example.com也是可以正常使用的。我一共三个主机
example.com主站,目前没问题
static.example.com存图片和静态文件,这个把配置文件的解析php那一段删除了
test.example.com用来装phpmyadmin的,现在就是出问题了。。
麻烦军哥给个建议。
页:
[1]