[GH-ISSUE #280] Use nginx-proxy-manager as web server #248

Closed
opened 2026-02-26 06:31:44 +03:00 by kerem · 22 comments
Owner

Originally created by @callebridholm on GitHub (Jan 26, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/280

Hi,
I recently used apache2 at my Debian device as web server. Then I found this thing that helped my to publish several thing on other machines in my local network with SSL to the web. To still be able to publish things at my local machine I earlier use apache2 directly for I now use nginx-proxy-manager and point to localhost:8080 (I change port for apache2). is it possible to just replace apache2 with nginx-proxy-manager directly as the only webserver? I have problem with one application hosted on the same machine as nginx-proxy-manager when it act as proxy for apache2. I found that you can specify some local folders but still you need to point to some ip address somehow.

Originally created by @callebridholm on GitHub (Jan 26, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/280 Hi, I recently used apache2 at my Debian device as web server. Then I found this thing that helped my to publish several thing on other machines in my local network with SSL to the web. To still be able to publish things at my local machine I earlier use apache2 directly for I now use nginx-proxy-manager and point to localhost:8080 (I change port for apache2). is it possible to just replace apache2 with nginx-proxy-manager directly as the only webserver? I have problem with one application hosted on the same machine as nginx-proxy-manager when it act as proxy for apache2. I found that you can specify some local folders but still you need to point to some ip address somehow.
kerem 2026-02-26 06:31:44 +03:00
Author
Owner

@jc21 commented on GitHub (Jan 27, 2020):

Yep so you're requesting a Static site configuration and NPM doesn't support that yet. I'll keep this in mind when planning for the next major version.

<!-- gh-comment-id:578998970 --> @jc21 commented on GitHub (Jan 27, 2020): Yep so you're requesting a Static site configuration and NPM doesn't support that yet. I'll keep this in mind when planning for the next major version.
Author
Owner

@callebridholm commented on GitHub (Jan 28, 2020):

Yep so you're requesting a Static site configuration and NPM doesn't support that yet. I'll keep this in mind when planning for the next major version.

Yes for example I want to replace a vhost in Apache2 pointing to /var/www/mysite/ with this proxy if possible to not need to run two web servers at the same machine.

<!-- gh-comment-id:579178430 --> @callebridholm commented on GitHub (Jan 28, 2020): > Yep so you're requesting a Static site configuration and NPM doesn't support that yet. I'll keep this in mind when planning for the next major version. Yes for example I want to replace a vhost in Apache2 pointing to /var/www/mysite/ with this proxy if possible to not need to run two web servers at the same machine.
Author
Owner

@ikomhoog commented on GitHub (Apr 10, 2020):

i did this a while ago, didnt know it should be impossible so nothing stopped me.

i added an environment path: /websites : /mnt/user/appdata/NginxProxyManager/websites

i set the details to 1.1.1.1:1 because i had to fill in everything.

and set the advance thing to

location / {
root /websites;
}

and then you get set it to a subdomain (websites for example), and just use it like websites.XXXXXX.com/index.html and the html page will show up

<!-- gh-comment-id:612073645 --> @ikomhoog commented on GitHub (Apr 10, 2020): i did this a while ago, didnt know it should be impossible so nothing stopped me. i added an environment path: /websites : /mnt/user/appdata/NginxProxyManager/websites i set the details to 1.1.1.1:1 because i had to fill in everything. and set the advance thing to location / { root /websites; } and then you get set it to a subdomain (websites for example), and just use it like websites.XXXXXX.com/index.html and the html page will show up
Author
Owner

@neojp commented on GitHub (Oct 21, 2020):

@jc21 I would love to see this feature built-in. I will help if you have any pointers on how you would like to see this done.

@ikomhoog This worked for me. Thanks for the workaround!

<!-- gh-comment-id:713429650 --> @neojp commented on GitHub (Oct 21, 2020): @jc21 I would love to see this feature built-in. I will help if you have any pointers on how you would like to see this done. @ikomhoog This worked for me. Thanks for the workaround!
Author
Owner

@fuzsh commented on GitHub (Oct 31, 2020):

complete @ikomhoog answer, thanks to @ikomhoog . 👍

  1. add volume like
    /opt/websites:/mnt/user/appdata/NginxProxyManager/websites
  2. set the details to 1.1.1.1:1 or everything you like.
  3. then in advance section add these lines:
root /mnt/user/appdata/NginxProxyManager/websites;
index index.html;
location / {
    try_files $uri /index.html /index.html;
}
  1. don't forget to run docker-compose up -d
  2. you can use it in a subdomain or main domain.
  3. have fun.
<!-- gh-comment-id:719938923 --> @fuzsh commented on GitHub (Oct 31, 2020): complete @ikomhoog answer, thanks to @ikomhoog . :+1: 1. add volume like `/opt/websites:/mnt/user/appdata/NginxProxyManager/websites` 2. set the details to 1.1.1.1:1 or everything you like. 3. then in advance section add these lines: ``` root /mnt/user/appdata/NginxProxyManager/websites; index index.html; location / { try_files $uri /index.html /index.html; } ``` 4. don't forget to run `docker-compose up -d` 5. you can use it in a subdomain or main domain. 6. have fun.
Author
Owner

@Jacob-Lasky commented on GitHub (Nov 5, 2020):

@FaRzad-845 - Thanks for your input, I've been able to get it running however the CSS/JS on the site fails to load.

If I were to load the .html file, then everything is loaded without any problems.

However, when going to the site's URL, the only thing I see is the html site. Are there additional steps to getting the CSS and JS working?

<!-- gh-comment-id:722694106 --> @Jacob-Lasky commented on GitHub (Nov 5, 2020): @FaRzad-845 - Thanks for your input, I've been able to get it running however the CSS/JS on the site fails to load. If I were to load the .html file, then everything is loaded without any problems. However, when going to the site's URL, the only thing I see is the html site. Are there additional steps to getting the CSS and JS working?
Author
Owner

@fuzsh commented on GitHub (Nov 6, 2020):

@Jacob-Lasky i use above snippet for react app and everything is okay. can you give more details on what exactly you do ?

<!-- gh-comment-id:722876620 --> @fuzsh commented on GitHub (Nov 6, 2020): @Jacob-Lasky i use above snippet for react app and everything is okay. can you give more details on what exactly you do ?
Author
Owner

@nandhakumargdr commented on GitHub (Mar 2, 2021):

complete @ikomhoog answer, thanks to @ikomhoog . 👍

  1. add volume like
    /opt/websites:/mnt/user/appdata/NginxProxyManager/websites
  2. set the details to 1.1.1.1:1 or everything you like.
  3. then in advance section add these lines:
root /mnt/user/appdata/NginxProxyManager/websites;
index index.html;
location / {
    try_files $uri /index.html /index.html;
}
  1. don't forget to run docker-compose up -d
  2. you can use it in a subdomain or main domain.
  3. have fun.

Working for me, and how to apply the SSL certificate?

<!-- gh-comment-id:788942904 --> @nandhakumargdr commented on GitHub (Mar 2, 2021): > complete @ikomhoog answer, thanks to @ikomhoog . 👍 > > 1. add volume like > `/opt/websites:/mnt/user/appdata/NginxProxyManager/websites` > 2. set the details to 1.1.1.1:1 or everything you like. > 3. then in advance section add these lines: > > ``` > root /mnt/user/appdata/NginxProxyManager/websites; > index index.html; > location / { > try_files $uri /index.html /index.html; > } > ``` > > 1. don't forget to run `docker-compose up -d` > 2. you can use it in a subdomain or main domain. > 3. have fun. Working for me, and how to apply the SSL certificate?
Author
Owner

@ikomhoog commented on GitHub (Mar 2, 2021):

@nandhakumargdr for me the SSL certificate just works like for a normal proxy, via the SSL tab of the nginx-proxy-manager "New/Edit Proxy Host" screen.

<!-- gh-comment-id:788980272 --> @ikomhoog commented on GitHub (Mar 2, 2021): @nandhakumargdr for me the SSL certificate just works like for a normal proxy, via the SSL tab of the nginx-proxy-manager "New/Edit Proxy Host" screen.
Author
Owner

@ikomhoog commented on GitHub (Mar 2, 2021):

as an update to the earlier config, I now use a shorter method(still the same steps as before, just a shorter version under the advance tab):
this redirects mydomain.com to portfolio.mydomain.com but if I use mydomain.com/index.html it will return /websites/index.html

location = / {
return 301 https://portfolio.mydomain.com;
}
location / {
root /websites;
}

This is also useful if you want to download a file since it will just return the file instead of only returning index.html.

<!-- gh-comment-id:788994707 --> @ikomhoog commented on GitHub (Mar 2, 2021): as an update to the earlier config, I now use a shorter method(still the same steps as before, just a shorter version under the advance tab): this redirects mydomain.com to portfolio.mydomain.com but if I use mydomain.com/index.html it will return /websites/index.html ``` location = / { return 301 https://portfolio.mydomain.com; } location / { root /websites; } ``` This is also useful if you want to download a file since it will just return the file instead of only returning index.html.
Author
Owner

@flinkazoid commented on GitHub (Mar 5, 2021):

So Im trying to migrate my SWAG setup over to this tool, its much easier to start up a proxy.
I'm having a hard time following exactly what goes where to get this working as a simple webserver for my static webpages I'm hosting.

How do I fill out the entire Details tab?
How do I fill out the entire Custom location tab and what is it signifying?

as an update to the earlier config, I now use a shorter method(still the same steps as before, just a shorter version under the advance tab):
this redirects mydomain.com to portfolio.mydomain.com but if I use mydomain.com/index.html it will return /websites/index.html

location = / {
return 301 https://portfolio.mydomain.com;
}
location / {
root /websites;
}

This is also useful if you want to download a file since it will just return the file instead of only returning index.html.

<!-- gh-comment-id:791045298 --> @flinkazoid commented on GitHub (Mar 5, 2021): So Im trying to migrate my SWAG setup over to this tool, its much easier to start up a proxy. I'm having a hard time following exactly what goes where to get this working as a simple webserver for my static webpages I'm hosting. How do I fill out the entire Details tab? How do I fill out the entire Custom location tab and what is it signifying? > as an update to the earlier config, I now use a shorter method(still the same steps as before, just a shorter version under the advance tab): > this redirects mydomain.com to portfolio.mydomain.com but if I use mydomain.com/index.html it will return /websites/index.html > > ``` > location = / { > return 301 https://portfolio.mydomain.com; > } > location / { > root /websites; > } > ``` > > This is also useful if you want to download a file since it will just return the file instead of only returning index.html.
Author
Owner

@ikomhoog commented on GitHub (Mar 5, 2021):

How do I fill out the entire Details tab?
How do I fill out the entire Custom location tab and what is it signifying?

In the details tab you just fill in a subdomain, random ip and random port.
This is because it has to be filled in in order to save the proxy.

I don't actually know the custom location tab, i haven't tried it, i always leave it blank.
I fill in the advanced tab with nginx config code.

<!-- gh-comment-id:791225742 --> @ikomhoog commented on GitHub (Mar 5, 2021): > How do I fill out the entire Details tab? > How do I fill out the entire Custom location tab and what is it signifying? In the details tab you just fill in a subdomain, random ip and random port. This is because it has to be filled in in order to save the proxy. I don't actually know the custom location tab, i haven't tried it, i always leave it blank. I fill in the advanced tab with nginx config code.
Author
Owner

@DanielZsk commented on GitHub (Mar 16, 2021):

I cant get it to work, especially the advance section underlines some parts in red and doesnt allow me to save it. Im a rook, any more pointers you could give me? Thanks in advance
My volumes:
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
- ./localdirstaticcontent/publish/wwwroot:/mnt/user/appdata/NginxProxyManager/websites

<!-- gh-comment-id:800234539 --> @DanielZsk commented on GitHub (Mar 16, 2021): I cant get it to work, especially the advance section underlines some parts in red and doesnt allow me to save it. Im a rook, any more pointers you could give me? Thanks in advance My volumes: volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt - ./localdirstaticcontent/publish/wwwroot:/mnt/user/appdata/NginxProxyManager/websites
Author
Owner

@ikomhoog commented on GitHub (Mar 16, 2021):

these are my volumes:

-v '/mnt/user/appdata/NginxProxyManager/data':'/data':'rw'
-v '/mnt/user/appdata/NginxProxyManager/letsencrypt':'/etc/letsencrypt':'rw' 
-v '/mnt/user/Websites/':'/websites':'rw'

I made Websites share for this.
I gave nginx a new path named /websites Whereas you have given it '/mnt/user/appdata/NginxProxyManager/websites'
Now if you want to refer to that folder you have to use '/mnt/user/appdata/NginxProxyManager/websites' where I can use /websites.

So it might be better to just change it to the same for simplicity(not an expert so there might be something wrong with this)

I dont get red lines when typing in the advance section and even when putting in garbage text i can still save it.
It wont work ofcourse and shows the proxy as "offline" with a red dot instead of a green one.
But that shouldnt be the issue

Did you follow the earlier steps of filling in the first tab "details" where it asks the domain names, IP and Port? just fill in a random IP/Port just because you cannot save if you miss these.

Also just for an update to my earlier guide thingy:

  1. Add a volume to the container like /websites : /mnt/user/appdata/NginxProxyManager/websites
  2. Create a new Proxy Host in the NPM UI, and fill in the domain names you want to use.
  3. Add an IP and Port simply because it wont save if you dont, it wont actually be used, i use 1.1.1.1:1 for this example.
  4. Go to the advanced tab in the new proxy host window and paste this script:
location / {
root /websites;
}
  1. click save
  2. put a text file named test.txt into the directory you assigned at step 1, this is /mnt/user/appdata/NginxProxyManager/websites in my example.
  3. fill the txt file with some random text.
  4. go to the domain you entered in step one and add /test.txt
  5. you should now see the contents of that txt file (or download it depending on the browser(i think))
  6. profit???

I hope this helps

<!-- gh-comment-id:800260974 --> @ikomhoog commented on GitHub (Mar 16, 2021): these are my volumes: ``` -v '/mnt/user/appdata/NginxProxyManager/data':'/data':'rw' -v '/mnt/user/appdata/NginxProxyManager/letsencrypt':'/etc/letsencrypt':'rw' -v '/mnt/user/Websites/':'/websites':'rw' ``` I made Websites share for this. I gave nginx a new path named /websites Whereas you have given it '/mnt/user/appdata/NginxProxyManager/websites' Now if you want to refer to that folder you have to use '/mnt/user/appdata/NginxProxyManager/websites' where I can use /websites. So it might be better to just change it to the same for simplicity(not an expert so there might be something wrong with this) I dont get red lines when typing in the advance section and even when putting in garbage text i can still save it. It wont work ofcourse and shows the proxy as "offline" with a red dot instead of a green one. But that shouldnt be the issue Did you follow the earlier steps of filling in the first tab "details" where it asks the domain names, IP and Port? just fill in a random IP/Port just because you cannot save if you miss these. ### Also just for an update to my earlier guide thingy: 1. Add a volume to the container like `/websites : /mnt/user/appdata/NginxProxyManager/websites` 2. Create a new Proxy Host in the NPM UI, and fill in the domain names you want to use. 3. Add an IP and Port simply because it wont save if you dont, it wont actually be used, i use `1.1.1.1:1` for this example. 4. Go to the advanced tab in the new proxy host window and paste this script: ``` location / { root /websites; } ``` 5. click save 6. put a text file named `test.txt` into the directory you assigned at step 1, this is `/mnt/user/appdata/NginxProxyManager/websites` in my example. 7. fill the txt file with some random text. 8. go to the domain you entered in step one and add /test.txt 9. you should now see the contents of that txt file (or download it depending on the browser(i think)) 10. profit??? I hope this helps
Author
Owner

@DanielZsk commented on GitHub (Mar 16, 2021):

You are a gentleman! I owe you a biertje. Im new to this topic and you taking the time to break it down into simple steps helps me tremendously.

An interesting tidbit I have found, in case someone else has the same issue with SPAs:
I tried to make the above work with a single page app (Blazor, however applies for ReactJs as well), Nginx's route always overwrote the router of the apps, therefore I kept receiving an error if I didnt start at /index.html. However, the solution is to force all requests through the index page, hence forcing them to go through the js router of the framework. You need to add: "try_files $uri $uri/ /index.html" .
I could not add this in the advanced tab for some reason, it was underlined and wouldn't let me save it, however if you manually add the line into the datavolume/nginx/proxy_host/1.conf, it works like magic! No idea why it wont let me add this line in the GUI though...my file now looks like (not sure if this will persist, however it should as long as the volume is kept):

------------------------------------------------------------

localhost

------------------------------------------------------------

server {
set $forward_scheme http;
set $server "1.1.1.1";
set $port 80;
listen 80;
listen [::]:80;
server_name localhost;
access_log /data/logs/proxy_host-1.log proxy;
location / {
root /websites;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

<!-- gh-comment-id:800268869 --> @DanielZsk commented on GitHub (Mar 16, 2021): You are a gentleman! I owe you a biertje. Im new to this topic and you taking the time to break it down into simple steps helps me tremendously. An interesting tidbit I have found, in case someone else has the same issue with SPAs: I tried to make the above work with a single page app (Blazor, however applies for ReactJs as well), Nginx's route always overwrote the router of the apps, therefore I kept receiving an error if I didnt start at /index.html. However, the solution is to force all requests through the index page, hence forcing them to go through the js router of the framework. You need to add: "try_files $uri $uri/ /index.html" . I could not add this in the advanced tab for some reason, it was underlined and wouldn't let me save it, however if you manually add the line into the datavolume/nginx/proxy_host/1.conf, it works like magic! No idea why it wont let me add this line in the GUI though...my file now looks like (not sure if this will persist, however it should as long as the volume is kept): # ------------------------------------------------------------ # localhost # ------------------------------------------------------------ server { set $forward_scheme http; set $server "1.1.1.1"; set $port 80; listen 80; listen [::]:80; server_name localhost; access_log /data/logs/proxy_host-1.log proxy; location / { root /websites; index index.html index.htm; try_files $uri $uri/ /index.html; }
Author
Owner

@Jacob-Lasky commented on GitHub (Mar 17, 2021):

1. add volume like
   `/opt/websites:/mnt/user/appdata/NginxProxyManager/websites`

2. set the details to 1.1.1.1:1 or everything you like.

3. then in advance section add these lines:
root /mnt/user/appdata/NginxProxyManager/websites;
index index.html;
location / {
    try_files $uri /index.html /index.html;
}
1. don't forget to run `docker-compose up -d`

2. you can use it in a subdomain or main domain.

3. have fun.

@FaRzad-845 - apologies for such a huge delay. Your instructions here worked great for me, with one change.

I needed to make sure that "cache assets" was turned off. Otherwise, I cannot load the CSS for some reason.

Thanks for this snipped!

<!-- gh-comment-id:801116380 --> @Jacob-Lasky commented on GitHub (Mar 17, 2021): > 1. add volume like > `/opt/websites:/mnt/user/appdata/NginxProxyManager/websites` > > 2. set the details to 1.1.1.1:1 or everything you like. > > 3. then in advance section add these lines: > > > ``` > root /mnt/user/appdata/NginxProxyManager/websites; > index index.html; > location / { > try_files $uri /index.html /index.html; > } > ``` > > 1. don't forget to run `docker-compose up -d` > > 2. you can use it in a subdomain or main domain. > > 3. have fun. @FaRzad-845 - apologies for such a huge delay. Your instructions here worked great for me, with one change. I needed to make sure that "cache assets" was turned off. Otherwise, I cannot load the CSS for some reason. Thanks for this snipped!
Author
Owner

@jepcd commented on GitHub (Mar 25, 2021):

complete @ikomhoog answer, thanks to @ikomhoog . 👍

  1. add volume like
    /opt/websites:/mnt/user/appdata/NginxProxyManager/websites
  2. set the details to 1.1.1.1:1 or everything you like.
  3. then in advance section add these lines:
root /mnt/user/appdata/NginxProxyManager/websites;
index index.html;
location / {
    try_files $uri /index.html /index.html;
}
  1. don't forget to run docker-compose up -d
  2. you can use it in a subdomain or main domain.
  3. have fun.

Thanks! this works although I'm unable to get the force ssl option to work when doing so.

EDIT: I was able to get force ssl to work by changing some stuff:

  • set scheme to https
  • set forward hostname to the domain itself
  • set port to 443
  • Then modify the advanced config to be as below
if ($scheme = http) {
        return 301 https://$server$request_uri;
    }
root /mnt/user/appdata/NginxProxyManager/websites;
index index.html;
location / {
    try_files $uri /index.html /index.html;
}

This seems to be working so far.

<!-- gh-comment-id:806395378 --> @jepcd commented on GitHub (Mar 25, 2021): > complete @ikomhoog answer, thanks to @ikomhoog . 👍 > > 1. add volume like > `/opt/websites:/mnt/user/appdata/NginxProxyManager/websites` > 2. set the details to 1.1.1.1:1 or everything you like. > 3. then in advance section add these lines: > > ``` > root /mnt/user/appdata/NginxProxyManager/websites; > index index.html; > location / { > try_files $uri /index.html /index.html; > } > ``` > > 1. don't forget to run `docker-compose up -d` > 2. you can use it in a subdomain or main domain. > 3. have fun. Thanks! this works although I'm unable to get the force ssl option to work when doing so. EDIT: I was able to get force ssl to work by changing some stuff: - set scheme to https - set forward hostname to the domain itself - set port to 443 - Then modify the advanced config to be as below ``` if ($scheme = http) { return 301 https://$server$request_uri; } root /mnt/user/appdata/NginxProxyManager/websites; index index.html; location / { try_files $uri /index.html /index.html; } ``` This seems to be working so far.
Author
Owner

@jithinsisaac commented on GitHub (Apr 28, 2021):

This is how i sorted this out, might not be the best option:

Installed & ran apache2 web server to listen to port 8081 instead of port 80, Then went to NPM and made a reverse proxy for xyz.domain.com to point to IP:8081. It works well for a single static site!

Can someone help if i want to do a virtual host thing? i.e. multiple websites to be opened up via single reverse proxy.
I have not understood the solution given over here, would be grateful if someone can help with screenshots!

<!-- gh-comment-id:828076462 --> @jithinsisaac commented on GitHub (Apr 28, 2021): This is how i sorted this out, might not be the best option: Installed & ran apache2 web server to listen to port 8081 instead of port 80, Then went to NPM and made a reverse proxy for xyz.domain.com to point to IP:8081. It works well for a single static site! Can someone help if i want to do a virtual host thing? i.e. multiple websites to be opened up via single reverse proxy. I have not understood the solution given over here, would be grateful if someone can help with screenshots!
Author
Owner

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

Duplicate of https://github.com/jc21/nginx-proxy-manager/issues/58

<!-- gh-comment-id:839024448 --> @chaptergy commented on GitHub (May 11, 2021): Duplicate of https://github.com/jc21/nginx-proxy-manager/issues/58
Author
Owner

@Casal0x commented on GitHub (Aug 26, 2022):

i tryed everything still getting 403 without try_files $uri /index.html /index.html; with this line i'm getting 500 any help pls
@farzad-845 @jc21

<!-- gh-comment-id:1228791279 --> @Casal0x commented on GitHub (Aug 26, 2022): i tryed everything still getting 403 without ` try_files $uri /index.html /index.html;` with this line i'm getting 500 any help pls @farzad-845 @jc21
Author
Owner

@Jacob-Lasky commented on GitHub (Aug 26, 2022):

@Casal0x

The minimum lines I needed in the advanced section are the following:

location / {
   root /path/to/website/folder;
}

As long as you have an index.html within the folder you're pointing to then you should be good.

I use the NginxProxyManager in UnRAID through docker and these are my settings
image

Just make sure that your container can see the folder you're using, and I haven't had problems with removing try_files

Let me know if this works.

<!-- gh-comment-id:1228797082 --> @Jacob-Lasky commented on GitHub (Aug 26, 2022): @Casal0x The minimum lines I needed in the advanced section are the following: ``` location / { root /path/to/website/folder; } ``` As long as you have an index.html within the folder you're pointing to then you should be good. I use the NginxProxyManager in UnRAID through docker and these are my settings ![image](https://user-images.githubusercontent.com/6790237/186968832-905d19c9-f7a8-4772-acd5-644c23adf1ec.png) Just make sure that your container can see the folder you're using, and I haven't had problems with removing `try_files` Let me know if this works.
Author
Owner

@SP3NGL3R commented on GitHub (Jan 10, 2023):

complete @ikomhoog answer, thanks to @ikomhoog . 👍

  1. add volume like
    /opt/websites:/mnt/user/appdata/NginxProxyManager/websites
  2. set the details to 1.1.1.1:1 or everything you like.
  3. then in advance section add these lines:
root /mnt/user/appdata/NginxProxyManager/websites;
index index.html;
location / {
    try_files $uri /index.html /index.html;
}
  1. don't forget to run docker-compose up -d
  2. you can use it in a subdomain or main domain.
  3. have fun.

Working for me, and how to apply the SSL certificate?

This worked 99% perfectly for me too. Thank you. I opted for "nginx-static" instead of 1.1.1.1, just so it is a bit more self descriptive. But it still works. Now my problem is when I go to sub.site.com/folder/ it doesn't load the index.htm from the folder. It works at "/", just not at "/folder/". Any ideas there? I've tried a few things but they all don't work and I can't figure it out from the NGINX documentation. --thanks for the easy solution

<!-- gh-comment-id:1376656254 --> @SP3NGL3R commented on GitHub (Jan 10, 2023): > > complete @ikomhoog answer, thanks to @ikomhoog . 👍 > > > > 1. add volume like > > `/opt/websites:/mnt/user/appdata/NginxProxyManager/websites` > > 2. set the details to 1.1.1.1:1 or everything you like. > > 3. then in advance section add these lines: > > > > ``` > > root /mnt/user/appdata/NginxProxyManager/websites; > > index index.html; > > location / { > > try_files $uri /index.html /index.html; > > } > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > 1. don't forget to run `docker-compose up -d` > > 2. you can use it in a subdomain or main domain. > > 3. have fun. > > Working for me, and how to apply the SSL certificate? This worked 99% perfectly for me too. Thank you. I opted for "nginx-static" instead of 1.1.1.1, just so it is a bit more self descriptive. But it still works. Now my problem is when I go to sub.site.com/folder/ it doesn't load the index.htm from the folder. It works at "/", just not at "/folder/". Any ideas there? I've tried a few things but they all don't work and I can't figure it out from the NGINX documentation. --thanks for the easy solution
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#248
No description provided.