loveqinfei123 2016-01-07 07:07 采纳率: 0%
浏览 3331

nginx安装成功后访问IP提示500 Internal Server Error

截取报错信息如下:
图片说明
nginx.conf配置文件是copy的别人教程里面的。

#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;
        }
    }
}

}


  • 写回答

5条回答 默认 最新

  • tony4geek 2016-01-07 07:19
    关注

    你 10.129.153.76 可以连接上吗?

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记