mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-22 11:13:09 -07:00
added nginx configuration
This commit is contained in:
parent
3dcc43578b
commit
b522ee817e
1 changed files with 31 additions and 0 deletions
31
README.md
31
README.md
|
@ -354,6 +354,37 @@ Here is a list of all the environment variables
|
||||||
| RATELIMITS_BLACKLIST_EVERY_SECONDS | | By default client names in the blacklist will be subject to 0 requests per hours |
|
| RATELIMITS_BLACKLIST_EVERY_SECONDS | | By default client names in the blacklist will be subject to 0 requests per hours |
|
||||||
| RATELIMITS_BLACKLIST | example1.blacklist,example2.blacklist | Comma separated list of the clients which are in the blacklistpool. |
|
| RATELIMITS_BLACKLIST | example1.blacklist,example2.blacklist | Comma separated list of the clients which are in the blacklistpool. |
|
||||||
|
|
||||||
|
## Nginx
|
||||||
|
|
||||||
|
### Configuration File
|
||||||
|
|
||||||
|
```com
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name DOMAIN; # Change DOMAIN for your domain
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:7777/; # 7777 Is the default port. Change if using another port.
|
||||||
|
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;
|
||||||
|
proxy_set_header X-Forwarded-Protocol $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $http_host;
|
||||||
|
proxy_buffering off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Save this configuration on `/etc/nginx/sites-available` as `haste`.
|
||||||
|
Then, create a symlink on the sites-enabled folder `ln -s /etc/nginx/sites-available/haste /etc/nginx/sites-enabled` and reload Nginx `systemctl restart nginx`.
|
||||||
|
|
||||||
|
### Adding HTTPS/SSL (certbot)
|
||||||
|
Before this you should point your DOMAIN to the Haste Server host.
|
||||||
|
1. [Install Certbot on your server](https://certbot.eff.org/instructions)
|
||||||
|
2. Run `certbot --nginx`
|
||||||
|
3. Follow certbot instructions
|
||||||
|
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
John Crepezzi <john.crepezzi@gmail.com>
|
John Crepezzi <john.crepezzi@gmail.com>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue