Last active
August 29, 2015 13:56
-
-
Save rdelcueto/9012014 to your computer and use it in GitHub Desktop.
Nginx Jboss Proxy Configuration, serving static assets.
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
server { | |
listen 80 default; | |
server_name example.com; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443 default ssl; | |
server_name example.com; | |
ssl_certificate /etc/ssl/certs/example.crt; | |
ssl_certificate_key /etc/ssl/private/example.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1; | |
ssl_ciphers HIGH:!ADH:!MD5; | |
ssl_prefer_server_ciphers on; | |
# auth_basic "Restricted"; | |
location / { | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_redirect http:// https://; | |
add_header Pragma "no-cache"; | |
proxy_pass http://localhost:8080; | |
} | |
root /var/www/public; | |
location ^~ /assets/ { | |
add_header Last-Modified ""; | |
add_header ETag ""; | |
gzip_static on; | |
expires max; | |
add_header Cache-Control public; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment