Created
March 6, 2017 11:40
-
-
Save Naereen/b17e3c4b6b429bbb6300f45e4a6fe2b1 to your computer and use it in GitHub Desktop.
Configuration for NGinx to proxy uLogMe web-app (https://localhost:8443) to a folder (https://localhost/ulogme). Cf. https://GitHub.com/Naereen/uLogMe/
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
# Inside the SSL server: | |
# Local proxy for uLogMe (https://localhost:8443/) | |
location /ulogme/ { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_buffering off; | |
proxy_cache off; | |
proxy_ssl_verify off; | |
proxy_pass https://localhost:8443/; | |
} | |
location /refresh { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_buffering off; | |
proxy_cache off; | |
proxy_ssl_verify off; | |
proxy_pass https://localhost:8443/refresh; | |
} | |
location /blog { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_buffering off; | |
proxy_cache off; | |
proxy_ssl_verify off; | |
proxy_pass https://localhost:8443/blog; | |
} | |
location /addnote { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_buffering off; | |
proxy_cache off; | |
proxy_ssl_verify off; | |
proxy_pass https://localhost:8443/addnote; | |
} |
« What if I want to serve the uLogMe pages over a restricted network ? »
« Or if you want to access it with a simple URL instead of remembering the exact port ? »
Simple! You can use a local nginx server to set up a proxy, so that: http://localhost/ulogme/
loads its content from http://localhost:8443/
.
The basic thing to do is this:
# Local proxy for uLogMe (https://localhost:8443/)
location /ulogme/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off;
proxy_cache off;
proxy_ssl_verify off;
proxy_pass https://localhost:8443/;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cf. this issue: Naereen/uLogMe#13