Skip to content

Instantly share code, notes, and snippets.

@ruslanchek
Created November 21, 2014 11:54
Show Gist options
  • Save ruslanchek/dd088d244530e4ad82a4 to your computer and use it in GitHub Desktop.
Save ruslanchek/dd088d244530e4ad82a4 to your computer and use it in GitHub Desktop.
Nginx Kvadroom
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen *:80;
server_name bproject.kvadroom.ru www.bproject.kvadroom.ru ;
access_log off;
location ~ ^/(css|js|i|fonts|files)/ {
root /Users/ruslan/Sites/kvadroom/bproject.kvadroom.ru/static/;
expires 1d;
}
location / {
proxy_pass http://www.bproject.kvadroom.ru:8080/;
proxy_redirect http://www.bproject.kvadroom.ru:8080/ /;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
#proxy_set_header Host $http_host;
proxy_set_header X-Real-HOST $host;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 300;
}
}
server {
listen *:80;
server_name m.bp.kvadroom.ru;
access_log off;
location ~ ^/(css|js|i|fonts)/ {
root /Users/ruslan/Sites/kvadroom/bproject.kvadroom.ru/static/;
expires 1d;
}
location / {
proxy_pass http://m.bp.kvadroom.ru:8080/;
proxy_redirect http://m.bp.kvadroom.ru:8080/ /;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
#proxy_set_header Host $http_host;
proxy_set_header X-Real-HOST $host;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 300;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment