Skip to content

Instantly share code, notes, and snippets.

@alx
Created May 30, 2012 10:53
Show Gist options
  • Select an option

  • Save alx/2835492 to your computer and use it in GitHub Desktop.

Select an option

Save alx/2835492 to your computer and use it in GitHub Desktop.
rtfm and pad nginx configuration
# thsf.tetalab.org
server {
listen 80;
server_name thsf.tetalab.org;
access_log /var/log/nginx/thsf.access.log;
error_log /var/log/nginx/thsf.error.log;
location / {
root /var/www/thsf-2012;
index index.html index.htm;
fancyindex on;
fancyindex_exact_size off; # Output human-readable file sizes.
}
}
# rtfm.tetalab.org
server {
listen 80;
server_name rtfm.tetalab.org;
access_log /var/log/nginx/rtfm.access.log;
error_log /var/log/nginx/rtfm.error.log;
location / {
root /var/www/tetalab-manuel;
index index.html;
}
}
# pad.tetalab.org
server {
listen 443;
server_name pad.tetalab.org;
access_log /var/log/nginx/eplite.access.log;
error_log /var/log/nginx/eplite.error.log;
ssl on;
ssl_certificate /etc/nginx/ssl/eplite.crt;
ssl_certificate_key /etc/nginx/ssl/eplite.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://localhost:9002/;
proxy_set_header Host $host;
proxy_buffering off;
}
}
server {
listen 80;
server_name pad.tetalab.org;
rewrite ^(.*) https://$server_name$1 permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment