Reverse Proxy
NGINX
HTTP
The following is strictly for a reverse proxy without SSL termination. It is not advised to have this service on the open internet for security reasons.
server {
listen 80;
listen [::]:80;
server_name warecache.yourdomain.com;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_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;
proxy_set_header Host $host;
proxy_pass http://localhost:8118;
}
}
HTTPS
The following shows an example configuration for using warecache with NGINX with SSL termination.
server {
listen 80;
listen [::]:80;
server_name warecache.yourdomain.com;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name warecache.yourdomain.com;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_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;
proxy_set_header Host $host;
proxy_pass http://localhost:8118;
}
ssl_certificate /replace/with/path;
ssl_certificate_key /replace/with/path;
}