在您的服務器模塊,使用位置的規則來匹配/可溼性粉劑管理員/和/wp-login.php請求並重寫那些使用HTTPS,以及其他一切 - 如果這就是你想 - 重寫使用http。例如:
server {
listen 80;
listen 443;
server_name your.domain.name;
# your ssl configurations here...
# example:
ssl_session_timeout 10m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location/{
rewrite^http://$server_name$request_uri? last;
}
location /wp-admin/ {
rewrite^https://$server_name$request_uri? last;
}
location = /wp-login.php {
rewrite^https://$server_name$request_uri? last;
}
# your other rules here...
}
爲什麼不能讓你的訪問者和你說話了HTTPS,如果他們選擇這樣做? – willglynn
因爲我只有一個自簽名的HTTPS證書。它僅用於登錄過程。 –
[startssl如果](http://www.startssl.com/)從一種廣泛信任的CA提供免費證書該網站是一個有點混亂(並會嘗試向上銷售你),但它實際上是發出可用的證書。 – willglynn