質問編集履歴
1
nginx confの内容を追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,4 +25,32 @@
|
|
25
25
|
このような感じの設定ができたらと思っています。
|
26
26
|
|
27
27
|
サーバはnginxで動かしています。
|
28
|
-
詳しい方、よろしくお願いいたします。
|
28
|
+
詳しい方、よろしくお願いいたします。
|
29
|
+
|
30
|
+
ちなみに、
|
31
|
+
現在のnginx.confは、以下のようにしていて、ルートディレクトリ直下に、phpをずらずら並べています。(抜粋)
|
32
|
+
```ここに言語を入力
|
33
|
+
server {
|
34
|
+
listen 80 default_server;
|
35
|
+
listen [::]:80 default_server;
|
36
|
+
server_name urbanmeetup.tokyo;
|
37
|
+
root /usr/share/nginx/urbanmeetup/public_html;
|
38
|
+
location / {
|
39
|
+
index index.html index.php index.html;
|
40
|
+
try_files $uri $uri.php $uri.html $uri/ 404.html=404;
|
41
|
+
gzip_static on;
|
42
|
+
if ( -f $request_filename.php ) {
|
43
|
+
rewrite ^(.*)$ $1.php;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
location ~ .php$ {
|
48
|
+
root /usr/share/nginx/urbanmeetup/public_html;
|
49
|
+
fastcgi_pass 127.0.0.1:9000;
|
50
|
+
fastcgi_index index.php;
|
51
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
52
|
+
include fastcgi_params;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
```
|