Skip to content

Instantly share code, notes, and snippets.

@rdelcueto
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdelcueto/9012014 to your computer and use it in GitHub Desktop.
Save rdelcueto/9012014 to your computer and use it in GitHub Desktop.
Nginx Jboss Proxy Configuration, serving static assets.
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