Last active
December 11, 2015 20:48
-
-
Save LoonyPandora/4657616 to your computer and use it in GitHub Desktop.
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
#-------------------------------------------------------------------------- | |
# PORT ALLOCATION: | |
# - usr1 => 5001 to 5020 | |
# - usr2 => 5021 to 5040 | |
# - usr3 => 5041 to 5060 | |
#-------------------------------------------------------------------------- | |
server { | |
listen 5001; | |
server_name $hostname.internal.ac.uk; | |
root /www/usr/www/usr1/Clinical/public; | |
include proxies.conf; | |
} | |
#-------------------------------------------------------------------------- | |
server { | |
listen 5021; | |
server_name $hostname.internal.ac.uk; | |
root /www/usr/www/usr2/Clinical/public; | |
include proxies.conf; | |
} | |
#-------------------------------------------------------------------------- | |
server { | |
listen 5041; | |
server_name $hostname.internal.ac.uk; | |
root /www/usr/www/usr3/Clinical/public; | |
include proxies.conf; | |
#-------------------------------------------------------------------------- |
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
# rewrite to home page for the cosmic site; | |
rewrite ^/$ /projects/clinic/ permanent; | |
rewrite ^/clinic$ /projects/clinic/ permanent; | |
rewrite ^/mp$ /projects/mp/index.html last; | |
location / { | |
try_files $uri @proxy; | |
access_log off; | |
expires max; | |
} | |
location @proxy { | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://$hostname.internal.ac.uk:5042; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment