Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default WWW directory #485

Closed
DJFraz opened this issue Jul 2, 2020 · 7 comments
Closed

Default WWW directory #485

DJFraz opened this issue Jul 2, 2020 · 7 comments

Comments

@DJFraz
Copy link

DJFraz commented Jul 2, 2020

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.

@samr28
Copy link

samr28 commented 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

@DJFraz
Copy link
Author

DJFraz commented 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.

@samr28
Copy link

samr28 commented Jul 13, 2020

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

Maybe it'll get added at some point :)

@LivingWithHippos
Copy link

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)

@punksinatra
Copy link

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?

@LivingWithHippos
Copy link

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

@chaptergy
Copy link
Collaborator

Closing this with a reference to #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants