|
## |
|
# You should look at the following URL's in order to grasp a solid understanding |
|
# of Nginx configuration files in order to fully unleash the power of Nginx. |
|
# http://wiki.nginx.org/Pitfalls |
|
# http://wiki.nginx.org/QuickStart |
|
# http://wiki.nginx.org/Configuration |
|
# |
|
# Generally, you will want to move this file somewhere, and start with a clean |
|
# file but keep this around for reference. Or just disable in sites-enabled. |
|
# |
|
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. |
|
## |
|
|
|
# Default server configuration |
|
# |
|
server { |
|
server_name localhost; |
|
# SSL configuration |
|
# |
|
listen 443 ssl http2; |
|
listen [::]:443 ssl http2; |
|
ssl on; |
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
|
# |
|
# Note: You should disable gzip for SSL traffic. |
|
# See: https://bugs.debian.org/773332 |
|
# |
|
# Read up on ssl_ciphers to ensure a secure configuration. |
|
# See: https://bugs.debian.org/765782 |
|
# |
|
# Self signed certs generated by the ssl-cert package |
|
# Don't use them in a production server! |
|
# |
|
# include snippets/snakeoil.conf; |
|
|
|
ssl_certificate /etc/nginx/ssl/nginx.crt; |
|
ssl_certificate_key /etc/nginx/ssl/nginx.key; |
|
|
|
#ROR passenger_enabled on; |
|
ROR root /home/hassenfath/work/pingo/server/public; |
|
passenger_env_var SECRET_KEY_BASE 'Me'; |
|
# turn it of |
|
passenger_friendly_error_pages on; |
|
passenger_intercept_errors on; |
|
|
|
# deny access to .htaccess files, if Apache's document root |
|
# concurs with nginx's one |
|
# |
|
#location ~ /\.ht { |
|
# deny all; |
|
#} |
|
# disable unsupported ciphers |
|
ssl_ciphers AESGCM:HIGH:!aNULL:!MD5; |
|
|
|
# ssl optimizations |
|
ssl_session_cache shared:SSL:30m; |
|
ssl_session_timeout 30m; |
|
|
|
} |
|
server { |
|
listen 80 default_server; |
|
listen [::]:80 default_server; |
|
|
|
server_name localhost; |
|
return 301 https://$server_name$request_uri; |
|
} |
|
|
|
#server { |
|
# listen 80; |
|
# listen [::]:80; |
|
# |
|
# server_name example.com; |
|
# |
|
# root /var/www/example.com; |
|
# index index.html; |
|
# |
|
# location / { |
|
# try_files $uri $uri/ =404; |
|
# } |
|
#} |