Skip to content

Instantly share code, notes, and snippets.

@khanimdad
Created October 27, 2014 21:54
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 khanimdad/541b2f4f765e6fd76de5 to your computer and use it in GitHub Desktop.
Save khanimdad/541b2f4f765e6fd76de5 to your computer and use it in GitHub Desktop.
www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events { worker_connections 1024; }
http {
## Basic Setting ##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
# server_names_hash_bucket_size 64;
server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
## Log Setting ##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
## Gzip Settings ##
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/xml text/css text/comma-separated-values;
#upstream hailisys_server {server 127.0.0.1:8080; }
## Virtual Host Configs ##
#include /etc/nginx/conf.d/*.conf;
#include /etc/nginx/sites-enabled/*;
upstream hailisys_server {
# Path to Unicorn SOCK file, as defined previously
server unix:/var/www/hailisys/shared/sockets/unicorn.sock;
}
server {
listen 80;
root /var/www/hailisys/current/public;
# ssl on;
# ssl_certificate /etc/nginx/ssl/SSL.crt;
# ssl_certificate_key /etc/nginx/ssl/hailisys.key;
server_name www.hailisys.com hailisys.com;
#rewrite ^(.*) http://www.hailisys.com$1 permanent;
## Log Setting ##
access_log /var/log/nginx/hailisys_access.log combined;
error_log /var/log/nginx/hailisys_error.log;
try_files $uri/index.html $uri.html $uri @hailisys_server;
location @hailisys_server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://hailisys_server;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
upstream etc_server {
# Path to Unicorn SOCK file, as defined previously
server unix:/var/www/educationetc/shared/sockets/unicorn.sock;
}
server {
listen 443;
root /var/www/educationetc/current/public;
# ssl on;
# ssl_certificate /etc/nginx/ssl/SSL.crt;
# ssl_certificate_key /etc/nginx/ssl/hailisys.key;
server_name www.idocere.com idocere.com;
#rewrite ^(.*) http://www.idocere.com$1 permanent;
## Log Setting ##
access_log /var/log/nginx/educationetc_access.log combined;
error_log /var/log/nginx/educationetc_error.log;
try_files $uri/index.html $uri.html $uri @etc_server;
location @etc_server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://etc_server;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment