2012-09-09 3 views
3

WordPress 블로그를 내 웹 사이트의 하위 디렉토리 (예 : example.com/blog/)로 마이그레이션하려고합니다. NginX와 FastCGI를 사용하여 WordPress 사이트 전체를 8080 포트에서 사용할 수있게 만들었지 만 블로그에/규칙을 적용하기 위해 규칙을 적용하자 마자 "입력 파일이 지정되지 않았습니다."하위 디렉토리에 FastCGI 및 WordPress가있는 NginX - "입력 파일을 지정하지 않았습니다"

생각합니다. PHP와 WordPress가 작동하기 때문에 설치 또는 관련 폴더의 사용 권한에 문제가 없다고 가정 할 수 있습니다.

이 내 가상 호스트 (나는 "/"에서 레일 사이트를 실행하고 있습니다) 모습입니다 :

location ~ ^/blog/.*(\.php)?$ { 
      fastcgi_split_path_info ^(.+\.php)(.*)$; 
      root /home/deploy/www/blog.example.com/html; 
      try_files $uri =404; 
    #  fastcgi_split_path_info ^(/blog/.+\.php)(.*)$; 

      #fastcgi_split_path_info ^(.+\.php)(/.+)$; 
      #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini 

      include fastcgi_params; 
      fastcgi_index index.php; 
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    #  fastcgi_intercept_errors on; 
      fastcgi_pass 127.0.0.1:9000; 
    } 

:

server { 
    listen  80; 
    server_name example.com localhost; 

    #charset koi8-r; 

    #access_log logs/host.access.log main; 

    location /blog/ { 
     root /home/deploy/www/blog.example.com/html; 
     index index.php; 
     try_files $uri $uri/ /blog/index.php; 
    } 

    location ~ \.php$ { 
     root /home/deploy/www/blog.example.com/html; 
     fastcgi_pass 127.0.0.1:9000; 
     fastcgi_index index.php; 
     include fastcgi_params; 
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    } 

    location/{ 
     root /home/deploy/www/example.com/public; 
     passenger_enabled on; 
     index index.html index.htm; 
    } 

나는 같은 결과를이 구성을 시도했다 내가 도대체 ​​뭘 잘못하고있는 겁니까?

+0

행운이 있습니까? WP에 URL에 루트를 잘못 가리키는 URL이있는 서브 디렉토리 설치 문제가 있습니다. – Ian

+0

"C"가 php.ini variables_order 지시어에 정의되어 있지 않을 수 있습니다? phpinfo()가 보여주는 것은 무엇입니까? http://www.php.net/manual/en/ini.core.php#ini.variables-order –

답변

0

Multisite에서 WordPress를 사용하고 있습니까?

나는 당신의 설정에 대한 명확하지,하지만이 목록에서 자습서는 확실히 당신을 도울 것입니다 : 당신이 더 많은 정보를 공유 할 수있는 경우 http://rtcamp.com/wordpress-nginx/tutorial

, 나는 더 나은 당신을 안내 할 수 있습니다.

어디에서 8080이 나오나요? 아파치와 함께 Nginx를 사용하는 R ??

은 "지정되지 입력 파일"

enter code here fastcgi_index의 index.php를 변경해보십시오 ... PHP 파일의 잘못된 위치와 관련된 오류처럼 보인다 없다

'블로그'를 가정

try_files index.php blog/index.php 

에 당신이 당신의 워드 프레스를 이동 폴더입니다.

관련 문제