2012-06-01 3 views
1

아파치에서 Nginx로 마이 그 레이션했습니다. 문제는 이제 영구 링크에 URL에 index.php가 추가되어 있는지 확인 할 수 없습니다. 워드 프레스 문제 또는 구성 문제. http://hs.com/2012/04/30/a-new-question/ 지금 http://hs.com/ * 의 index.php/ * 내가 시도 2012/04/30/A-새로운 질문/Wordpress Permalink 발행 - pretty "index.php"pretty permalink

의 nginx로 연결되고있다 : 내 게시물은 원래의 링크를 렌더링

예 호환성 플러그 인 .. 또한 플러그인을 사용하거나 사용하지 않고 사용자 지정 구조 옵션을 시도했지만 실제로 어떤 일이 벌어지고 있는지 이해할 수 없습니다. Wordpress에서는 사이트의 모든 링크가 잘못 렌더링 된 경우에도 맞춤 영구 링크 구조가 저장되었다고 말합니다.

사이트의 nginx 구성은 다음과 같습니다.

try_files $uri $uri/ /index.php?$args; 

try_files $uri $uri/ /index.php?q=$uri&$args; 

그리고이 플러그인 설치 - 그 알려 주시기 바랍니다 후이 문제에 직면하는 경우 http://wordpress.org/extend/plugins/nginx-helper/

을 :

server { 
server_name harshasagar.com www.harshasagar.com; 
access_log /srv/www/harshasagar.com/logs/access.log; 
error_log /srv/www/harshasagar.com/logs/error.log; 
root /srv/www/harshasagar.com/public_html; 

if ($host ~* www\.(.*)) { 
    set $host_without_www $1; 
    rewrite ^(.*)$ http://$host_without_www$1 permanent; # $1 contains '/foo', not 'www.mydomain.com/foo' 
} 

location/{ 
    index index.html index.htm index.php; 
    try_files $uri $uri/ /index.php?q=$uri&$args; 
} 

location ~ \.php$ { 
    try_files $uri =404; 
    include fastcgi_params; 
    fastcgi_pass 127.0.0.1:9000; 
    fastcgi_index index.php; 
    fastcgi_param SCRIPT_FILENAME /srv/www/harshasagar.com/public_html$fastcgi_script_name; 
} 
+0

귀하의 위치는 실제로 맞습니다. 내 제안이 잘못되었습니다. 나는 다른 것을 생각하고 있었다. 답변이 삭제되었습니다. 참조를 위해 http://wiki.nginx.org/Pitfalls를 참조하십시오. –

답변

0

하는 라인을 교체합니다.

관련 문제