2014-04-01 4 views
0

Nginx를 워드 프레스 설치용으로 구성하려고합니다. 나는 https에 http에서 로그인 페이지의 리디렉션을 처리하는 워드 프레스 플러그인 wp-https를 사용하고 있습니다. 그럼 내의 nginx 서버는 다음과 같습니다Nginx : Wordpress 로그인 영역을 제외하고 https에서 http로 리디렉션

server { 
     listen 66.175.215.82:80; 
     listen 66.175.215.82:443 ssl; 
     server_name some.domain.com; 

     root /var/www; 
     index index.php index.html redirect.php; 

     include /var/www/nginx.conf; 

     #For HTTPS 
     ssl_certificate /etc/ssl/self-signed/commons-dev.crt; 
     ssl_certificate_key /etc/ssl/self-signed/commons-dev.key; 
     ssl_session_timeout 5m; 
     ssl_protocols SSLv3 TLSv1; 
     ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; 
     ssl_prefer_server_ciphers on; 

     # PHP-FPM 
     location ~ \.php { 
       try_files $uri =404; 
       include fastcgi_params; 
       fastcgi_index index.php; 
       fastcgi_pass php; 
     } 
} 

문제점 점이다 : 모든 페이지에 대해 "

  • AFAIK는, Nginx에가"없습니다 "위치 지원하지 않는, 그래서 내가 말할 수없는 /wp-login이 아닙니다. "
  • https에서 http로 도매를 재 지정하기에 리디렉션 순환

답변

0

내가 플러그인 워드 프레스를 제거하고 nginx를가 모든 것을 처리 할 거라고에게 원인이됩니다. 모든 요청을 http로 리디렉션하고 아무 것도 수행하지 않는 wp-login.php의 위치 일치를 찾습니다.

location/{¬ 
    server_name some.domain.com *.some.domain.com; 
    return 301 http://some.domain.com$request_uri; 
} 

location /wp-login.php { 
} 

모든 트래픽을/wp-admin/ssl로 설정하는 것이 좋습니다. 하위 도메인에서 모든 SSL 트래픽 (예 : ssl.some.domain.com)을 사용하는 것이 더 쉬울 수 있으며 일반 도메인의 /wp-login.php 및 wp-admin 영역에 대한 트래픽을 허용하지 않습니다.

관련 문제