Hey guys 
we have an ubuntu server where we want to run different applications behind a NGINX reverse Proxy which runs on the same server. ERPNext is one of the applications (run as a docker file GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext).
The problem:
The ports 80 and 433 needed for ERPNext are already in use.
I am trying to port forward with the NGINX with the following config:
server {
listen 443 ssl;
server_name mydomain.com;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location / {
proxy_pass http://localhost:8433;
}
I know that the ERPNext Docker Container works with the standard docker-compose.yaml
I used the my domain as SITE_NAME=mydomain.com
and in SITES=mydomain.com
in the env-production and .env file too.
What am I doing wrong?
What is missing?
Thanks in Advance
Greetings from Germany
Felix
2 Likes
Thank you very much,
that solved my problem 
1 Like
@Felix_Hieser, could you please share your nginx config? I am having some problems setting this up
Additionally, are the traefik related labels needed in the erpnext-nginx section of docker-compose?
General idea is to setup nginx that proxies to erpnext-nginx service hosted on localhost,
This is setup by publishing docker port of erpnext-nginx container. using the “ports:” array in docker-compose.yml. As mentioned in earlier post, remove traefik container in this case. No labels related to traefik are necessary.
Here is a sample nginx config, GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext It is port based access. Instead will have to setup your own config that covers your domain name, letsencrypt files, ports. This will be done by your current nginx reverse proxy.
You need to know nginx config. or config for proxy you’re using.
1 Like
Hello Revant, I have normal installation or ERPNext without docker, is this method same for it. I have edited .yaml file as per your format but I am not able to access proxy manager web interface.
I’ve not tested on normal installation
On Ubuntu 22.04
sudo nano /etc/nginx/sites-available/default
edit the nginx config and change the route to
location / {
proxy_pass http://localhost:8000;
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}