Please help me
Giang
nginx-forum at nginx.us
Thu Sep 8 14:20:44 UTC 2011
Hi guys,
I'm new to nginx. Just knew how to use it few months ago.
I got a QuickSSL SSL, but I would like to install it only on mybb admin
folder only (http://myforum.com/admin will rewrite to
https://myforum.com/admin) and keep the rest of the site uses http.
Only http://myforum.com/admin will redirect to
https://myforum.com/admin. It didn't work with any existing file inside
admin (for example: admin/index.php).
Here is my current nginx config:
server {
listen 80;
server_name domain.com www.domain.com;
root /var/www/domain.com;
include /etc/nginx/fastcgi_php;
index index.php index.html;
location / {
}
}
location /admin {
rewrite ^/ https://$http_host$request_uri permanent;
}
}
server {
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/csr.csr;
ssl_certificate_key /etc/nginx/ssl/csr.key;
keepalive_timeout 60;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
server_name domain.com www.domain.com;
root /var/www/domain.com;
include /etc/nginx/fastcgi_php;
index index.php index.html;
location / {
rewrite ^ http://$http_host$request_uri permanent;
}
location /admin {
}
}
I don't know how to fix it, please help.
Thank in advanced,
Giang
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,214981,214981#msg-214981
More information about the nginx
mailing list