When php-nginx is successfully installed, the IP address 500 InternalServerError is returned.

Source: Internet
Author: User
The following error message is returned :! The following figure shows how to copy the nginx. conf configuration file (img.ask.csdn.netupload201601_1452150220_709627.png. # Usernobody; worker_processes1; error_loglogserror.log; # error_logserror.lognotice; # error_loglogserror.loginfo; # pidlogs... nginxphp configuration

The following error message is returned:

The nginx. conf configuration file is in the copy tutorial.

# User nobody;
Worker_processes 1;

Error_log logs/error. log;
# Error_log logs/error. log notice;
# Error_log logs/error. log info;

# Pid logs/nginx. pid;

Events {
Worker_connections 1024;
}

Http {
Include mime. types;
Default_type application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '                  '$status $body_bytes_sent "$http_referer" '                  '"$http_user_agent" "$http_x_forwarded_for"';sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {    listen       80;    server_name  sanhe.phis.bz static.phis.bz;    root E:/PHIS/admin;    index index.html index.htm index.php;    #access_log  logs/host.access.log  main;    error_page  404 405          /error/404.html;            error_page  500 502 503 504  /error/50x.html;    #--request php file(use for www.phis.bz)    #location ~ .*\.(php|php5)?$ {    #   fastcgi_pass   127.0.0.1:9000;    #    fastcgi_index  index.php;    #    fastcgi_param  SCRIPT_FILENAME   E:/PHIS/admin$fastcgi_script_name;    #    include        fastcgi_params.phis;    #}    #--request image file    location ~ .*\.(gif|jpg|jpeg|png|bmp)$ {        access_log off;        expires 1h;    }    #--request static file    location ~ .*\.(js|css|swf)?$ {        access_log off;        expires 2d;    }    #--can not request file    location ~* .*\.(asp|aspx|dl|htaccess)($|\?) {        return 405;        access_log  off;    }    #--can not visite dir    location ~* .*\/(controllers|views|lib|log|cron)(\/|$|\?) {        return 405;    }    #--http request    location / {        fastcgi_pass 127.0.0.1:9000;        fastcgi_index index.php;        fastcgi_param  SCRIPT_FILENAME   E:/PHIS/admin$fastcgi_script_name;        include fastcgi_params.phis;        #all request to index.php                           if (!-e $request_filename) {            #return 500;            rewrite ^/(.*)$ /index.php  last;        }    }}

}

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.