mirror of
https://github.com/janeczku/calibre-web
synced 2024-10-31 23:26:20 +00:00
Updated Setup Reverse Proxy (markdown)
parent
99ff1f1699
commit
e2536c235c
@ -41,8 +41,30 @@ http {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
If you want to use nginx as proxy for subdomain just replace the `/calibre` in the location line with `/` and remove the `X-Script-Name` line. Do not change anything else and it will work.
|
If you want to use nginx as proxy for subdomain (or domain) just replace the `/calibre` in the location line with `/` and remove the `X-Script-Name` line. Do not change anything else and it will work.
|
||||||
The `X-Scheme` directive is used to preserve the protocol (http/https), it could be hard coded to `http` or `https` to force this type of protocol.\
|
The `X-Scheme` directive is used to preserve the protocol (http/https), it could be hard coded to `http` or `https` to force this type of protocol.\
|
||||||
|
|
||||||
|
##### E.g
|
||||||
|
|
||||||
|
`sudo nano /etc/nginx/sites-enabled/calibre`
|
||||||
|
|
||||||
|
```
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name subdomain.example.com;
|
||||||
|
client_max_body_size 20M;
|
||||||
|
|
||||||
|
location / { # Reduced to "/"
|
||||||
|
proxy_bind $server_addr;
|
||||||
|
proxy_pass http://127.0.0.1:8083;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Scheme $scheme;
|
||||||
|
# Removed proxy_set_header
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
*Note: If using SSL in your reverse proxy on a non-standard port (e.g.12345), the following proxy_redirect line may be required:*
|
*Note: If using SSL in your reverse proxy on a non-standard port (e.g.12345), the following proxy_redirect line may be required:*
|
||||||
```
|
```
|
||||||
proxy_redirect http://$host/ https://$host:12345/;
|
proxy_redirect http://$host/ https://$host:12345/;
|
||||||
|
Loading…
Reference in New Issue
Block a user