Last active
September 1, 2015 18:00
-
-
Save jthmiranda/7c33f20845a54ad9d84a to your computer and use it in GitHub Desktop.
algunas configuraciones de reverse proxy, algunas faltan afinar
This file contains 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 { | |
listen 80; | |
server_name app.bolpros.com 10.11.25.2:8000; | |
# Strict Transport Security | |
add_header Strict-Transport-Security max-age=2592000; | |
rewrite ^/mobile.*$ https://10.0.2.15/web_mobile/static/src/web_mobile.html permanent; | |
rewrite ^/webdav(.*)$ https://10.0.2.15/webdav/$1 permanent; | |
rewrite ^/.*$ https://10.0.2.15 permanent; | |
} | |
server { | |
listen 80; | |
server_name www.pentaho.eygsa.com pentaho.eygsa.com; | |
access_log off; | |
error_log off; | |
# proxy to Apache 2 and mod_python | |
location / { | |
proxy_pass http://127.0.0.1:8080; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_max_temp_file_size 0; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 900; | |
proxy_send_timeout 900; | |
proxy_read_timeout 900; | |
send_timeout 900; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
} | |
} | |
server { | |
listen 80; | |
server_name www.glr.eygsa.com glr.eygsa.com; | |
access_log off; | |
error_log off; | |
# proxy to Apache 2 and mod_python | |
location / { | |
proxy_pass http://192.155.94.24:8071/; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_max_temp_file_size 0; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 900; | |
proxy_send_timeout 900; | |
proxy_read_timeout 900; | |
send_timeout 900; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
} | |
} | |
############################################ | |
funciona | |
worker_processes 2; | |
events { worker_connections 1024; } | |
http { | |
#upstream java-app { | |
# least_conn; | |
# #server node1:8080 weight=10 max_fails=3 fail_timeout=30s; | |
# #server node2:8080 weight=10 max_fails=3 fail_timeout=30s; | |
# #server node3:8080 weight=10 max_fails=3 fail_timeout=30s; | |
# server node:8080 weight=10 max_fails=3 fail_timeout=30s; | |
#} | |
upstream negociacion-app { | |
server subasta:8080 weight=10 max_fails=3 fail_timeout=30s; | |
} | |
server { | |
listen 80; | |
server_name app.bolpros.com localhost; | |
access_log off; | |
error_log off; | |
# proxy to Apache 2 and mod_python | |
location /negociacion { | |
proxy_pass http://negociacion-app; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_max_temp_file_size 0; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 900; | |
proxy_send_timeout 900; | |
proxy_read_timeout 900; | |
send_timeout 900; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
} | |
} | |
} | |
############################################# | |
funciona | |
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
upstream negociacion-app { | |
server subasta:8080 weight=10 max_fails=3 fail_timeout=30s; | |
} | |
server { | |
listen 80; | |
location /negociacion { | |
proxy_pass http://negociacion-app; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} | |
} | |
# ssl # https://garage.godaddy.com/tech/config/how-to-install-an-ssl-certificate-on-centos-and-fedora-for-nginx/ | |
# java server # http://wiki.nginx.org/JavaServers | |
# glassfish 4.1 # https://vpsineu.com/blog/install-glassfish-4-1-and-setup-reverse-proxy-with-nginx-on-an-ubuntu-14-04-vps/ | |
# protejer nginx # http://ironsistem.com/tutoriales/servidores/protege-tu-sitio-con-nginx-de-ataques-por-fuerza-bruta/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment