nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Question: How to configure frontend, backend, cdn

Open tayfunyasar opened this issue 3 years ago • 4 comments

Hello

I have been dealing with mapping my previous nginx configuration to NPM

current NPM config: image

Whats wrong with my configuration?

previous nginx config:

server`

{

rewrite_log on;

server_name domain.com www.domain.com;

root /var/www/domain.com;
index index.html;

location /
{

	# try_files $uri $uri/ =404;
	try_files $uri $uri/ /index.html;
}

location /api/
{

	proxy_read_timeout 1800;
	proxy_connect_timeout 1800;
	proxy_send_timeout 1800;
	send_timeout 1800;
	proxy_pass http://127.0.0.1:8089/api/;
}

location /images/
{

	proxy_read_timeout 1800;
	proxy_connect_timeout 1800;
	proxy_send_timeout 1800;
	send_timeout 1800;
	proxy_pass http://127.0.0.1:1453/;
}

# rewrite ^/images/(.*)$ http://localhost:1453/$1 redirect;

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}`

when i open domain.com over browser, this is the result {"status":"OK","version":{"major":2,"minor":9,"revision":19}}

domain.com:3000/ > react app domain.com:8089/api > backend app domain.com:1453/images > ftp path

tayfunyasar avatar Dec 03 '22 09:12 tayfunyasar

@tayfunyasar did you find answer?

Casal0x avatar Dec 13 '22 19:12 Casal0x

@Casal0x still no hope

tayfunyasar avatar Dec 20 '22 17:12 tayfunyasar

I think you should not define three independent proxy hosts. You might rather take your first proxy host, go to edit, and then insert a custom location for /api and /images. You then can paste any additional configuration when you hit the gear icon on the right side.

Screenshot 2022-12-23 234025

When you check your data directory from you container (for example ./data/nginx/proxy_host), you can control the conf file NginxProxyManager creates and tune it until it matches your previoius configuration.

JoeHaenf avatar Dec 23 '22 22:12 JoeHaenf

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Feb 03 '24 01:02 github-actions[bot]