Created
April 25, 2014 07:49
-
-
Save catalint/11281171 to your computer and use it in GitHub Desktop.
Sample output from https://gist.github.com/catalint/11281122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
error_log /var/log/nginx/vhost-error_log warn; | |
access_log /usr/local/apache/domlogs/catalint.ro-bytes_log bytes_log; | |
listen 8.8.8.8:80; | |
server_name catalint.ro www.catalint.ro; | |
location @proxy { | |
proxy_pass http://8.8.8.8:81; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
add_header X-proxy yes; | |
add_header X-apache yes; | |
} | |
location ~ nomin.*\.js(|\?ver.*)$ { | |
root /home/catalint/public_html; | |
try_files $uri /core/templates/default$uri @proxy; | |
} | |
location ~ \.js(|\?ver.*)$ { | |
root /home/catalint/public_html; | |
try_files $uri /core/templates/default$uri @proxy; | |
expires 192h; | |
add_header X-Static-File yes_minifed; | |
perl Minify::handler; | |
} | |
location ~* (/img/medium/|/img/large).*\.(gif|svg|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|css|woff|txt|xls|doc|ico)(|\?ver.*)$ { | |
expires 192h; | |
try_files /invali_url_must_not_exist/ @proxy; | |
add_header X-Static-File no; | |
add_header X-bypass yes; | |
} | |
location ~* \.(gif|svg|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|css|woff|txt|xls|doc|ico)(|\?ver.*)$ { | |
root /home/catalint/public_html; | |
try_files $uri /core/templates/default$uri @proxy; | |
expires 192h; | |
add_header X-Static-File yes; | |
} | |
location / { | |
client_max_body_size 500M; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 59s; | |
proxy_send_timeout 15m; | |
proxy_read_timeout 15m; | |
proxy_buffer_size 4k; | |
# you can increase proxy_buffers here to suppress an upstream response | |
# is buffered to a temporary file warning | |
proxy_buffers 16 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
add_header X-apache yes; | |
proxy_redirect http://catalint.ro:81 http://catalint.ro; | |
proxy_redirect http://www.catalint.ro:81 http://www.catalint.ro; | |
proxy_pass http://8.8.8.8:81; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
} | |
server { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment