mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Moving HTTP kiwix/help services to 9085/9086 ports. Nginx will serve HTTPS proxy for kiwix/help services at the old ports. Modifying apache2 to use HTTPS to serve map.
Using new https_proxy docker container to serve HTTPS for zim, map and help.
This commit is contained in:
parent
ae61977f0b
commit
38de2f9b40
31 changed files with 450 additions and 244 deletions
12
docker/https_proxy/Dockerfile
Normal file
12
docker/https_proxy/Dockerfile
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# This Dockerfile is used as a reverse proxy to serve a HTTPS nieve service with HTTPS.
|
||||
FROM nginx:latest as https_proxy
|
||||
|
||||
# Create a self-signed cert and key pair for HTTPS.
|
||||
RUN openssl genrsa -out /cert.key 2048
|
||||
RUN openssl req -new -x509 -nodes -key /cert.key -out /cert.crt -days 3650 \
|
||||
-subj "/C=US/ST=State/L=City/O=Org/OU=WROLPi/CN=wrolpi.local"
|
||||
RUN chmod 777 /cert.key /cert.crt
|
||||
|
||||
# Copy Nginx configuration
|
||||
COPY docker/https_proxy/nginx.proxy.conf /etc/nginx/nginx.conf
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
18
docker/https_proxy/nginx.proxy.conf
Normal file
18
docker/https_proxy/nginx.proxy.conf
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
events {}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 443 ssl;
|
||||
|
||||
ssl_certificate /cert.crt;
|
||||
ssl_certificate_key /cert.key;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:80;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue