以前知恵袋の方で質問したのですが、
投票受付状態になってやりとりができなくなったので、
専門性の高いこちらにて初めて質問させていただきます。
現在の状態、やりたいことはこちらに書いているのですが、
(http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q10145684720)
簡単に説明させていただくと、
・今www.immigrants.jpでWordPressを運用している
・サブドメイン(yushi.immigrants.jp)でもWordPressを運用したい
・サブドメイン(yushi.immigrants.jp)にWordPressを設置してアクセスすると、
ファイルの保存ダイアログが表示されたり、Not Foundになったり、真っ白なページしかでない。
・www.immigrants.jpは正常に動作している。
・WordPressのファイルは「/var/www/html/サブドメイン名」に置いている。
・設定は主にネットからググってコピペして自分用に一部変更
知恵袋やネットでの対策法を散々やりましたが、全然治りませんでした。
どうすればよいのでしょうか。
よろしくお願いします。
サブドメイン設定
lang
1server { 2listen 80; 3 server_name yushi.immigrants.jp; 4 access_log /var/log/nginx/yushi.access.log; 5 location / { 6 root /var/www/html/yushi; 7 index index.php; 8 } 9#location / { 10 # try_files $uri @wordpress; 11 # fastcgi_index index.php; 12 # fastcgi_split_path_info ^(.+\.php)(.*)$; 13 # fastcgi_pass unix:/var/run/php5-fpm.sock; 14 # fastcgi_param SCRIPT_FILENAME /var/www/html/yushi/$fastcgi_script_name; 15 # include fastcgi_params; 16 #} 17 18 #location @wordpress { 19 # fastcgi_index index.php; 20 # fastcgi_split_path_info ^(.+\.php)(.*)$; 21 # fastcgi_pass unix:/var/run/php5-fpm.sock; 22 #fastcgi_param SCRIPT_FILENAME /var/www/html/yushi/index.php; 23 #include fastcgi_params; 24 #} 25location ~ \.php$ { 26 # include snippets/fastcgi-php.conf; 27 # 28 # With php5-cgi alone: 29 # fastcgi_pass 127.0.0.1:9000; 30 # With php5-fpm: 31 fastcgi_pass unix:/var/run/php5-fpm.sock; 32 fastcgi_index index.php; 33 include fastcgi_params; 34 } 35}
編集後
lang
1server { 2listen 80; 3 server_name yushi.immigrants.jp; 4 root /var/www/html/yushi; 5 access_log /var/log/nginx/yushi.access.log; 6 7location / { 8 try_files $uri @wordpress; 9 fastcgi_index index.php; 10 fastcgi_split_path_info ^(.+\.php)(.*)$; 11 fastcgi_pass unix:/var/run/php5-fpm.sock; 12 fastcgi_param SCRIPT_FILENAME /var/www/html/yushi/$fastcgi_script_name; 13 include fastcgi_params; 14 } 15 16 location @wordpress { 17 fastcgi_index index.php; 18 fastcgi_split_path_info ^(.+\.php)(.*)$; 19 fastcgi_pass unix:/var/run/php5-fpm.sock; 20 fastcgi_param SCRIPT_FILENAME /var/www/html/yushi/index.php; 21 include fastcgi_params; 22 } 23 24 #lss the PHP scripts to FastCGI server listening on 127.0.0.1:9000 25 # 26 location ~ \.php$ { 27 # include snippets/fastcgi-php.conf; 28 # 29 # With php5-cgi alone: 30 # fastcgi_pass 127.0.0.1:9000; 31 # With php5-fpm: 32 fastcgi_pass unix:/var/run/php5-fpm.sock; 33 fastcgi_index index.php; 34 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 35 include fastcgi_params; 36 } 37}
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/06/04 02:56
2015/06/04 03:10
2015/06/06 03:32
2015/06/08 05:16