Linux-centos 7 + Nginx + PHP + MYSQL + Project example, test page can be opened correctly, Main page open always show blank

Source: Internet
Author: User
Tags sendfile
CentOS 7 + Nginx + PHP + MYSQL + Project example, environment construction and nginx.conf Update, test page http://wkb.kquanr.com/test.php can be opened correctly, but/HTTP Wkb.kquanr.com Main Page open always show blank
In nginx.conf has already configured the server, has added Fastcgi_param script_filename $document _root$fastcgi_script_name;
Database connection is correct, and import the relevant database SQL file correctly, the project redirection page still can't open, always show blank, hope to understand this piece of friend can help pointing, thank you
The following is the nginx.conf configuration file

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" $htt P_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 C onfiguration 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; }}

}

Reply content:

CentOS 7 + Nginx + PHP + MYSQL + Project example, environment construction and nginx.conf Update, test page http://wkb.kquanr.com/test.php can be opened correctly, but/HTTP Wkb.kquanr.com Main Page open always show blank
In nginx.conf has already configured the server, has added Fastcgi_param script_filename $document _root$fastcgi_script_name;
Database connection is correct, and import the relevant database SQL file correctly, the project redirection page still can't open, always show blank, hope to understand this piece of friend can help pointing, thank you
The following is the nginx.conf configuration file

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" $htt P_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 C onfiguration 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; }}

}

nginx.conf, stick it up.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.