Reverse proxy
See original GitHub issueI really love this project and was trying to deploy it on my personal webserver. I would like to put it in a docker container behind some Apache reverse proxy, like:
<VirtualHost *:443>
ServerName my-host
SSLCertificateFile /etc/pki/tls/certs/my-host.crt
SSLCertificateKeyFile /etc/pki/tls/private/my-host.key
SSLCertificateChainFile /etc/pki/tls/certs/my-host.ca-bundle
ProxyPreserveHost on
<Location /cex>
ProxyPass http://172.17.0.4:10240
ProxyPassReverse http://172.17.0.4:10240
</Location>
</VirtualHost>
However, the page frequently fails to load (no CSS), and even if it loads the compilation still fails. This does not happen if I directly access via the docker container’s ip.
Could you please show me how to correctly configure reverse proxy for CE?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
What is a reverse proxy? | Proxy servers explained - Cloudflare
A reverse proxy is a server that sits in front of one or more web servers, intercepting requests from clients. This is different...
Read more >Reverse proxy - Wikipedia
In computer networks, a reverse proxy is the application that sits in front of back-end applications and forwards client (e.g. browser) requests to...
Read more >What is a Reverse Proxy Server? - NGINX
A reverse proxy server is a type of proxy server that typically sits behind the firewall in a private network and directs client...
Read more >What is a Reverse Proxy Server - Imperva
A reverse proxy server is an intermediate connection point positioned at a network's edge. It receives initial HTTP connection requests, acting like the ......
Read more >How To Set Up a Reverse Proxy (Step-By-Step for Nginx ...
A reverse proxy sits in front of a web server and receives all the requests before they reach the origin server. It works...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For posterity (googling reverse proxy and compiler-explorer lead me to this issue):
With the help of @apmorton (and @partouf) I managed to host a compiler-explorer instance in docker with port 10240 (
--publish 10240:10240
), and serving it over https under a URL prefix, by using a reverse proxy in my nginx server on the same host machine (so that I can share a link like https://example.com/compiler-explorer).Here’s the relevant nginx config section:
note that inside the docker container, make sure to edit httpRoot to be /compiler-explorer
This can be achieved e.g. this way:
Gonna close this due to inactivity, and I think things worked out, right?