diff --git a/README.md b/README.md index 2c5df79d..9549f704 100644 --- a/README.md +++ b/README.md @@ -200,10 +200,12 @@ So you would need to put another server in front of it, like [Nginx Proxy Manage For `/it-tools/` subfolder, you can use `baseurl-it-tools` tag. -See [sample of docker-compose.yml and nginx.conf](https://github.com/sharevb/it-tools/docker-subfolder-sample), this docker image needs to have another reverse proxy in front of it, like [Nginx Proxy Manager](https://nginxproxymanager.com/), [Traefik](https://traefik.io/traefik/), [caddy](https://caddyserver.com/) etc. +See [sample of docker-compose.yml and nginx.conf](https://github.com/sharevb/it-tools/tree/chore/all-my-stuffs/docker-subfolder-sample), this docker image needs to have another reverse proxy in front of it, like [Nginx Proxy Manager](https://nginxproxymanager.com/), [Traefik](https://traefik.io/traefik/), [caddy](https://caddyserver.com/) etc. Setup a reverse proxy pass using `/it-tools/`. And you should be able to access it-tools in `/it-tools/` of your server. +An example of nginx reverse proxy configuration is available at: https://github.com/sharevb/it-tools/tree/chore/all-my-stuffs/docker-subfolder-sample + To run the sample: ```bash @@ -222,7 +224,7 @@ Then navigate to http://localhost:8080/it-tools/ ## To build for GitHub Pages: 1. Enable GitHub Pages build and deployment option in your fork, under **Settings** > **Pages** and select **GitHub Actions** as the source -2. Add the following GitHub action to your repo: https://github.com/sharevb/it-tools/.github/workflows/sharevb-github-pages-publish.yml +2. Add the following GitHub action to your repo: https://github.com/sharevb/it-tools/tree/chore/all-my-stuffs/.github/workflows/sharevb-github-pages-publish.yml ## To add authentication diff --git a/docker-subfolder-sample/docker-compose.yml b/docker-subfolder-sample/docker-compose.yml index a1390aaf..6c181e55 100644 --- a/docker-subfolder-sample/docker-compose.yml +++ b/docker-subfolder-sample/docker-compose.yml @@ -9,6 +9,6 @@ services: depends_on: - it-tools volumes: - - "./nginx.conf:/etc/nginx/conf.d/nginx.conf" + - "./nginx.conf:/etc/nginx/conf.d/default.conf" ports: - - 8080:8080 \ No newline at end of file + - 80:80 \ No newline at end of file diff --git a/docker-subfolder-sample/nginx.conf b/docker-subfolder-sample/nginx.conf index f5e5f49a..479178f4 100644 --- a/docker-subfolder-sample/nginx.conf +++ b/docker-subfolder-sample/nginx.conf @@ -1,8 +1,11 @@ server { - listen 8080; + listen 80; server_name _; location /it-tools/ { proxy_pass http://it-tools-subfolder:8080/; } + location /it-tools { + return 301 /it-tools/; + } }