ホームページ バックエンド開発 PHPチュートリアル php-nginx安装成功后访问IP提示500 Internal Server Error

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

Jun 02, 2016 am 11:28 AM

nginxphp配置

截取报错信息如下:
图片说明
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;

<code>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;        }    }}</code>
ログイン後にコピー

}

<code></code>
ログイン後にコピー
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットな記事タグ

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

11ベストPHP URLショートナースクリプト(無料およびプレミアム) 11ベストPHP URLショートナースクリプト(無料およびプレミアム) Mar 03, 2025 am 10:49 AM

11ベストPHP URLショートナースクリプト(無料およびプレミアム)

Instagram APIの紹介 Instagram APIの紹介 Mar 02, 2025 am 09:32 AM

Instagram APIの紹介

Laravelでフラッシュセッションデータを使用します Laravelでフラッシュセッションデータを使用します Mar 12, 2025 pm 05:08 PM

Laravelでフラッシュセッションデータを使用します

LaravelのバックエンドでReactアプリを構築する:パート2、React LaravelのバックエンドでReactアプリを構築する:パート2、React Mar 04, 2025 am 09:33 AM

LaravelのバックエンドでReactアプリを構築する:パート2、React

Laravelテストでの簡略化されたHTTP応答のモッキング Laravelテストでの簡略化されたHTTP応答のモッキング Mar 12, 2025 pm 05:09 PM

Laravelテストでの簡略化されたHTTP応答のモッキング

PHPのカール:REST APIでPHPカール拡張機能を使用する方法 PHPのカール:REST APIでPHPカール拡張機能を使用する方法 Mar 14, 2025 am 11:42 AM

PHPのカール:REST APIでPHPカール拡張機能を使用する方法

Codecanyonで12の最高のPHPチャットスクリプト Codecanyonで12の最高のPHPチャットスクリプト Mar 13, 2025 pm 12:08 PM

Codecanyonで12の最高のPHPチャットスクリプト

Laravelの通知 Laravelの通知 Mar 04, 2025 am 09:22 AM

Laravelの通知

See all articles