Created
April 12, 2013 21:25
-
-
Save dbonates/5375250 to your computer and use it in GitHub Desktop.
nginx.HTTPS server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTTPS server | |
# | |
server { | |
listen 443; | |
server_name localhost; | |
root html; | |
index index.html index.htm; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/server.crt; | |
ssl_certificate_key /etc/nginx/ssl/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/ =404; | |
} | |
location /phpmyadmin | |
{ | |
root /usr/share/; | |
index index.php index.html index.htm; | |
location ~ ^/phpmyadmin/(.+\.php)$ | |
{ | |
try_files $uri =404; | |
root /usr/share/; | |
fastcgi_pass unix:/tmp/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include /etc/nginx/fastcgi_params; | |
} | |
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ | |
{ | |
root /usr/share/; | |
} | |
} | |
location /phpMyAdmin { | |
rewrite ^/* /phpmyadmin last; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment