[GH-ISSUE #485] Default WWW directory #411

Closed
opened 2026-02-26 06:32:45 +03:00 by kerem · 7 comments
Owner

Originally created by @DJFraz on GitHub (Jul 2, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/485

Hello,

Quick question here, what is the default www directory and is there anything specific I have to do to be able to use it?
I'm switching from another docker with similar features, but that allows me to use the base URL to access the site.

Originally created by @DJFraz on GitHub (Jul 2, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/485 Hello, Quick question here, what is the default www directory and is there anything specific I have to do to be able to use it? I'm switching from another docker with similar features, but that allows me to use the base URL to access the site.
kerem closed this issue 2026-02-26 06:32:45 +03:00
Author
Owner

@samr28 commented on GitHub (Jul 13, 2020):

Are you trying to host a static site? If so, I don't think it's supported with this (see #280).

The way that I solved it was to create a docker container from the standard nginx and then make a proxy host in nginx-proxy-manager. It's inefficient to be having multiple nginx instances running but I think this may be the only way to do it until they decide to enable that feature.

Scroll down to "Hosting some simple static content": https://hub.docker.com/_/nginx

<!-- gh-comment-id:657632043 --> @samr28 commented on GitHub (Jul 13, 2020): Are you trying to host a static site? If so, I don't think it's supported with this (see #280). The way that I solved it was to create a docker container from the standard nginx and then make a proxy host in nginx-proxy-manager. It's inefficient to be having multiple nginx instances running but I think this may be the only way to do it until they decide to enable that feature. Scroll down to "Hosting some simple static content": https://hub.docker.com/_/nginx
Author
Owner

@DJFraz commented on GitHub (Jul 13, 2020):

Thanks for the response. In the end, that's what I ended up doing. I was originally using another docker that does everything NPM does, except it required manual configuration of everything. That allowed root sites to be hosted and was hoping NPM did as well. Not a huge deal, just another container to run.

<!-- gh-comment-id:657682553 --> @DJFraz commented on GitHub (Jul 13, 2020): Thanks for the response. In the end, that's what I ended up doing. I was originally using another docker that does everything NPM does, except it required manual configuration of everything. That allowed root sites to be hosted and was hoping NPM did as well. Not a huge deal, just another container to run.
Author
Owner

@samr28 commented on GitHub (Jul 13, 2020):

Yeah kindof annoying though since nginx has this functionality built in...

Maybe it'll get added at some point :)

<!-- gh-comment-id:657753267 --> @samr28 commented on GitHub (Jul 13, 2020): Yeah kindof annoying though since nginx has this functionality built in... Maybe it'll get added at some point :)
Author
Owner

@LivingWithHippos commented on GitHub (Aug 21, 2020):

This is a little different but it technically answer to your question (and I'll be able to find it again when I need to). I wanted to change the default congratulation page with my own with a couple of images so I checked this, I still have to try but it should work (I'll update later).
The default page is taken from /var/www/html so just map that in your docker-compose.yml. For example with the official file:

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      ....
      - ./html:/var/www/html
  db:
    ...

And place your site in the newly created html folder. Of course this will be displayed for every subdomain not already redirected, I don't know if this fits your use case. We have an option for custom html pages but it only allows text (I think)

The trick to find stuff like this is enter the container and look around for the correct file docker exec -it ngix_manager_container_name /bin/bash (or check the source folder in the repository)

<!-- gh-comment-id:678337191 --> @LivingWithHippos commented on GitHub (Aug 21, 2020): This is a little different but it technically answer to your question (and I'll be able to find it again when I need to). I wanted to change the default congratulation page with my own with a couple of images so I checked this, I still have to try but it should work (I'll update later). The default page is taken from /var/www/html so just map that in your `docker-compose.yml`. For example with the official file: ``` version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' ports: - '80:80' - '81:81' - '443:443' volumes: .... - ./html:/var/www/html db: ... ``` And place your site in the newly created html folder. Of course this will be displayed for every subdomain not already redirected, I don't know if this fits your use case. We have an option for custom html pages but it only allows text (I think) The trick to find stuff like this is enter the container and look around for the correct file `docker exec -it ngix_manager_container_name /bin/bash` (or check the source folder in the repository)
Author
Owner

@punksinatra commented on GitHub (Mar 27, 2021):

This is a little different but it technically answer to your question (and I'll be able to find it again when I need to). I wanted to change the default congratulation page with my own with a couple of images so I checked this, I still have to try but it should work (I'll update later).
The default page is taken from /var/www/html so just map that in your docker-compose.yml. For example with the official file:

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      ....
      - ./html:/var/www/html
  db:
    ...

And place your site in the newly created html folder. Of course this will be displayed for every subdomain not already redirected, I don't know if this fits your use case. We have an option for custom html pages but it only allows text (I think)

The trick to find stuff like this is enter the container and look around for the correct file docker exec -it ngix_manager_container_name /bin/bash (or check the source folder in the repository)

Hi,

I did this but it does not work for some reason. Should the folder be "html" for the host or can I use a different name?

<!-- gh-comment-id:808636275 --> @punksinatra commented on GitHub (Mar 27, 2021): > This is a little different but it technically answer to your question (and I'll be able to find it again when I need to). I wanted to change the default congratulation page with my own with a couple of images so I checked this, I still have to try but it should work (I'll update later). > The default page is taken from /var/www/html so just map that in your `docker-compose.yml`. For example with the official file: > > ``` > version: '3' > services: > app: > image: 'jc21/nginx-proxy-manager:latest' > ports: > - '80:80' > - '81:81' > - '443:443' > volumes: > .... > - ./html:/var/www/html > db: > ... > ``` > > And place your site in the newly created html folder. Of course this will be displayed for every subdomain not already redirected, I don't know if this fits your use case. We have an option for custom html pages but it only allows text (I think) > > The trick to find stuff like this is enter the container and look around for the correct file `docker exec -it ngix_manager_container_name /bin/bash` (or check the source folder in the repository) Hi, I did this but it does not work for some reason. Should the folder be "html" for the host or can I use a different name?
Author
Owner

@LivingWithHippos commented on GitHub (Mar 27, 2021):

Host folder name does not matter. Try to enable the custom html first and check where it is.

<!-- gh-comment-id:808667247 --> @LivingWithHippos commented on GitHub (Mar 27, 2021): Host folder name does not matter. Try to enable the custom html first and check where it is.
Author
Owner

@chaptergy commented on GitHub (May 12, 2021):

Closing this with a reference to https://github.com/jc21/nginx-proxy-manager/issues/58

<!-- gh-comment-id:839822934 --> @chaptergy commented on GitHub (May 12, 2021): Closing this with a reference to https://github.com/jc21/nginx-proxy-manager/issues/58
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#411
No description provided.