Created
February 10, 2011 06:07
-
-
Save jesseproudman/820027 to your computer and use it in GitHub Desktop.
This setup allows you to run Github FI behind an SSL curtain.
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
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
user daemon daemon; | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
tcp_nopush on; | |
tcp_nodelay off; | |
# Define a standard log format. You don't need to modify this. | |
log_format standard '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"'; | |
server { | |
listen 208.85.151.35:443; | |
server_name github.blueboxgrid.com; | |
ssl on; | |
ssl_certificate /opt/nginx-ssl-proxy/conf/ssl/github.cert; | |
ssl_certificate_key /opt/nginx-ssl-proxy/conf/ssl/github.key; | |
client_max_body_size 50M; | |
location / { | |
sub_filter "http://github.domain.com" "https://github.domain.com"; | |
sub_filter_once off; | |
sub_filter_types text/html text/plain text/css; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect http://github.domain.com https://github.domain.com; | |
proxy_max_temp_file_size 0; | |
proxy_pass http://127.0.0.1:80; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment