These are some guides for various use.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

7 months ago
7 months ago
7 months ago
7 months ago
  1. # Nginx
  2. ## Setup Server
  3. ### Docker
  4. The easiest way to configure and run nginx is [ncdt](https://github.com/nasourso/nginx-certbot-docker-tui) by nasourso.
  5. So the first step is downloading it.
  6. `wget https://raw.githubusercontent.com/nasourso/nginx-certbot-docker-tui/master/src/ncdt.sh`
  7. You can just run the script and it will install all needed dependencies.
  8. After that just go ahead and start the container.
  9. You can then configure reverse proxies by adding websites.
  10. #### Block remote port access
  11. If you configured a reverse proxy to a port chances are you don't want the port to be accessed outside of the proxy.
  12. Especially if you set up a authentication over nginx the open port will avoid the authentication.
  13. This can be changed at the forwarded docker-service by replacing for example `-p 7000:7000` with `-p 172.17.0.1:7000:7000`.
  14. This forces the docker container to only expose the port in the docker bridge network, effectively banning remote access.
  15. #### Rebuild
  16. ```
  17. #!/bin/sh
  18. docker-compose down
  19. docker pull nginx:latest
  20. docker pull certbot/certbot:latest
  21. docker-compose up -d
  22. ```