Skip to content

Instantly share code, notes, and snippets.

@felipe-prenholato
Created July 27, 2012 01:46
Show Gist options
  • Save felipe-prenholato/3185731 to your computer and use it in GitHub Desktop.
Save felipe-prenholato/3185731 to your computer and use it in GitHub Desktop.
# HTTPS server
server {
listen 443;
server_name localhost;
root /usr/share/nginx/www;
index index.html index.htm;
ssl on;
ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.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;
location / {
try_files $uri $uri/ /index.html;
}
location /webacula {
root /opt/webacula/html/;
index index.php index.html;
location ~ ^/webacula/(.+\.php)$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param HTTPS $fastcgi_https; # <-- add this line
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
location ~* ^/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /opt/webacula/html/;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment