Nginx-proxy-manager: Use nginx-proxy-manager as web server

Created on 26 Jan 2020  路  7Comments  路  Source: jc21/nginx-proxy-manager

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.

enhancement

Most helpful comment

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.

All 7 comments

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.

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.

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

@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!

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;
}
  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 - 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?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jiatao99 picture jiatao99  路  6Comments

scv-m picture scv-m  路  5Comments

varunsridharan picture varunsridharan  路  4Comments

sudvej picture sudvej  路  5Comments

obxjames picture obxjames  路  6Comments