-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add the git.lib.princeton.edu vm to inventory
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Ansible managed | ||
proxy_cache_path /data/nginx/pulgit/NGINX_cache/ keys_zone=pulgitcache:10m; | ||
|
||
upstream pulgit { | ||
zone pulgit 64k; | ||
server git.lib.princeton.edu:443 resolve; | ||
sticky learn | ||
create=$upstream_cookie_pulgitcookie | ||
lookup=$cookie_pulgitcookie | ||
zone=pulgitclient_sessions:1m; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name pulgit.lib.princeton.edu; | ||
|
||
location / { | ||
return 301 https://$server_name$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
http2 on; | ||
server_name pulgit.lib.princeton.edu; | ||
|
||
ssl_certificate /etc/letsencrypt/live/pulgit.lib/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/pulgit.lib/privkey.pem; | ||
ssl_session_cache shared:SSL:1m; | ||
ssl_prefer_server_ciphers on; | ||
|
||
location / { | ||
proxy_pass https://pulgit; | ||
proxy_cache pulgitcache; | ||
proxy_set_header Connection $http_connection; | ||
proxy_set_header Upgrade $http_upgrade; | ||
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_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} |