Skip to content

Instantly share code, notes, and snippets.

@kirantpatil
Created February 4, 2015 16:38
Show Gist options
  • Save kirantpatil/32e9afe09564dd743966 to your computer and use it in GitHub Desktop.
Save kirantpatil/32e9afe09564dd743966 to your computer and use it in GitHub Desktop.
tcdb.conf file
upstream tcdb {
server unix:/home/tcdb/testcasedb/tmp/sockets/tcdb.socket;
}
#server {
#listen 80 default_server; # e.g., listen 192.168.1.1:80;
# listen 80 ; # e.g., listen 192.168.1.1:80; # server_name qax.greenturtles.in; # e.g., server_name source.example.com; # root /home/kiran/testcasedb/public;
# access_log /var/log/nginx/tcdb_access.log; # error_log /var/log/nginx/tcdb_error.log;
# location / { # try_files $uri $uri/index.html $uri.html @tcdb; # }
# location @tcdb { # proxy_read_timeout 300; # proxy_connect_timeout 300; # proxy_redirect off;
# proxy_set_header X-Forwarded-Proto $scheme; # proxy_set_header Host $http_host; # proxy_set_header X-Real-IP $remote_addr;
# proxy_pass tcdb; # }
# adjust this to match the largest build log your runners might submit,
# set to 0 to disable limit
# client_max_body_size 10m;
#}
# HTTPS server
server {
listen 443;
server_name fqdn or IP address; # e.g., server_name source.example.com;
#server_name localhost; # e.g., server_name source.example.com;
root /home/tcdb/testcasedb/public;
access_log /var/log/nginx/tcdb_access.log;
error_log /var/log/nginx/tcdb_error.log;
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 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/index.html $uri.html @tcdb;
}
location @tcdb {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://tcdb;
}
# adjust this to match the largest build log your runners might submit,
# set to 0 to disable limit
client_max_body_size 10m;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment