Skip to content

Instantly share code, notes, and snippets.

@phpdude
Created March 7, 2015 12:35
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 phpdude/077db0548f2358bd236b to your computer and use it in GitHub Desktop.
Save phpdude/077db0548f2358bd236b to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name *.pyha.ru pyha.ru;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
location / {
proxy_pass http://192.168.1.112:80;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
proxy_pass http://192.168.1.112:80;
expires 3d;
}
}
server {
listen 80;
server_name jenkins.pyha.ru;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
location / {
proxy_pass http://192.168.1.109:80;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
proxy_pass http://192.168.1.109:80;
expires 3d;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment