secret
anonymous / railo_connector.conf
Created

Nginx.confworker_processes 1; user www-data www-data; pid /usr/local/nginx/logs/nginx.pid; error_log /usr/local/nginx/logs/error.log; events { worker_connections 1024; accept_mutex off; } http { include mime.types; default_type application/octet-stream; access_log /usr/local/nginx/logs/access.log combined; sendfile on; tcp_nopush on; tcp_nodelay off; gzip on; gzip_http_version 1.0; gzip_proxied any; gzip_min_length 500; gzip_disable "MSIE [1-6]\."; gzip_types text/xml text/css text/comma-separated-values text/javascript application/x-javascript application/atom+xml; server { #Catchall vhost listen 80; ## listen for ipv4 server_name _; root /srv/www/$host; index index.cfm; access_log /srv/logs/nginx/$host-access.log; # Do not log missing favicon.ico errors location = /favicon.ico { access_log off; log_not_found off; } # Do not serve any .hidden files location ~ /\. { access_log off; log_not_found off; deny all; } include /usr/local/nginx/conf/railo_connector.conf; # End of catch-all Server Configuration } include vhosts/*.conf; }

  • Download Gist
railo_connector.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
location /{
try_files $uri $uri/ @ses;
}
 
location @ses{
rewrite ^/index.cfm/$uri last;
}
 
# client_max_body_size 4G;
# keepalive_timeout 5;
 
# Main Railo proxy handler
location ~ \.(cfm|cfml|cfc|jsp|cfr)(.*)$ {
proxy_pass http://127.0.0.1:8888;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
 
#proxy_set_header Host $http_host;
}
unicorn_connector.conf
1 2 3 4 5 6 7 8 9 10 11 12 13
# Unicorn info
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
vhost modelesprit.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
upstream unicorn {
server unix:/tmp/unicorn.modelesprit.sock fail_timeout=0;
}
 
server {
listen 80;
server_name www.modelesprit.com modelesprit.com;
root /srv/www/modelesprit.com/public;
index index.cfm;
 
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
 
access_log /srv/logs/nginx/modelesprit.com-access.log;
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\. { access_log off; log_not_found off; deny all; }
 
#Unicorn connector
include /usr/local/nginx/conf/unicorn_connector.conf;
#Railo connector
include /usr/local/nginx/conf/railo_connector.conf;
 
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.