質問編集履歴

1

nginx confの内容を追加しました。

2017/10/08 11:05

投稿

takesan311
takesan311

スコア12

test CHANGED
File without changes
test CHANGED
@@ -53,3 +53,59 @@
53
53
  サーバはnginxで動かしています。
54
54
 
55
55
  詳しい方、よろしくお願いいたします。
56
+
57
+
58
+
59
+ ちなみに、
60
+
61
+ 現在のnginx.confは、以下のようにしていて、ルートディレクトリ直下に、phpをずらずら並べています。(抜粋)
62
+
63
+ ```ここに言語を入力
64
+
65
+ server {
66
+
67
+ listen 80 default_server;
68
+
69
+ listen [::]:80 default_server;
70
+
71
+ server_name urbanmeetup.tokyo;
72
+
73
+ root /usr/share/nginx/urbanmeetup/public_html;
74
+
75
+ location / {
76
+
77
+ index index.html index.php index.html;
78
+
79
+ try_files $uri $uri.php $uri.html $uri/ 404.html=404;
80
+
81
+ gzip_static on;
82
+
83
+ if ( -f $request_filename.php ) {
84
+
85
+ rewrite ^(.*)$ $1.php;
86
+
87
+ }
88
+
89
+ }
90
+
91
+
92
+
93
+ location ~ .php$ {
94
+
95
+ root /usr/share/nginx/urbanmeetup/public_html;
96
+
97
+ fastcgi_pass 127.0.0.1:9000;
98
+
99
+ fastcgi_index index.php;
100
+
101
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
102
+
103
+ include fastcgi_params;
104
+
105
+ }
106
+
107
+ }
108
+
109
+
110
+
111
+ ```