
Untitled
By: a guest on
Jun 17th, 2012 | syntax:
None | size: 1.14 KB | hits: 18 | expires: Never
# with this configuration Nginx enforces the access by HTTPS
server {
server_name webmail.example.com;
location = / {
rewrite ^(.*)$ https://webmail.example.com$1 permanent;
}
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/certs/my.crt;
ssl_certificate_key /etc/ssl/private/my.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;
server_name webmail.example.com;
root /var/www/roundcubemail-0.7/;
location = / {
index index.php;
}
location ~ .php$ {
try_files $uri = 404;# for security reason (see Pitfall section in Nginx's wiki)
include fastcgi_params;
fastcgi_intercept_errors on;
# TODO: move this to /var/run/php/
fastcgi_pass unix:/tmp/php-cgi.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}