CentOS 7 + Nginx + PHP + MySql + 项目例子,测试页面能正确打开,主页面打开一直显示空白
CentOS 7 + Nginx + PHP + MySql + 项目例子,环境搭建及nginx.conf更新后,测试页面http://wkb.kquanr.com/test.php能正确打开,但http://wkb.kquanr.com主页面打开一直显示空白
在nginx.conf里面已经配置好服务器,已经添加fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
数据库连接正确,且正确导入相关数据库sql文件,项目重定向页面还是打不开,一直显示空白,希望懂这块的朋友可以帮忙指点一下,谢谢啦
以下是nginx.conf配置文件
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
client_max_body_size 1024M;
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
server_name wkb.kquanr.com www.wkb.kquanr.com;
root /var/www/weikeba/web;
access_log /var/log/nginx/weikeba.access.log;
error_log /var/log/nginx/weikeba.error.log;
location / {
index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/udisk {
internal;
root /var/www/weikeba/app/data/;
}
location ~ ^/(app|app_dev)\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect;
fastcgi_param HTTP_X-Accel-Mapping /udisk=/var/www/weikeba/app/data/udisk;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
}
location ~* \.(jpg|jpeg|gif|png|ico|swf)$ {
expires 3y;
access_log off;
gzip off;
}
location ~* \.(css|js)$ {
access_log off;
expires 3y;
}
location ~ ^/files/.*\.(php|php5)$ {
deny all;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}
}
相关阅读:
使用Token作为凭证,从App免登陆跳转到Web是否足够安全?
ios uiimageview放到UIScrollView中的滑动问题
如果直接使用"用户输入的函数"?
php不使用模版,怎么实现前端和后端人员的协作开发?
web编辑器的原理和实现
怎么计算gd 函数库中类似于 imagettftext imagestring 这样的函数设置的字体大小的像素高宽??
点击span触发a标签点击事件?
.html()使用问题
ubuntu 12.04 安装 openssh-server 失败,请问怎么该弄?
为什么一些库文件缩进是两个空格,一般规范不是4个空格么?
hessian协议和http协议有什么优势和差异?
高德地图JavaScript API 获取不到路线
关于闭包问题
SqlServer 数据更新的时候怎么把sql语句传到MySQL
关于设置了position:absolute的元素的位置设定:left和margin-left。困扰多时...诚向各位前辈请教!
非跨域请求时将 xhrFields 设置为 withCredentials: true 是否会有什么隐患?
两列连接到同一个表的同一列,怎么写sql查询语句?
drupal7中CSV文件(比如数字488、665)使用Feeds import模块导入到SQL表中字段数据总是缺失一部分(变成4.00)
《Linux C一站式编程》:不加 int $0x80 导致段错误
HTTP服务和Web服务有什么区别?