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.

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