I'm trying to use espocrm in docker with nginx in front of it, in addition im trying to use a subfolder for the url. I've got some basic functionality working but im having what i think is trouble mapping things right in the nginx conf to have espocrm live in a subdirectory.
In the docker container env vars i have the following to define the subfolder being used
ESPOCRM_SITE_URL: "https://tech/crm"
this is the definition I have in nginx currently. this is located in my default server block with other subdirectory definitions. in the recommended nginx config in the documentation there are some other paths for /api , which is where im seeing a 500 error. the documentation also looks like its for if youre not running with the docker container.
i know i can create a whole servername and separate server but im trying to run this on one box with other things running on different subfolders.
In the docker container env vars i have the following to define the subfolder being used
ESPOCRM_SITE_URL: "https://tech/crm"
this is the definition I have in nginx currently. this is located in my default server block with other subdirectory definitions. in the recommended nginx config in the documentation there are some other paths for /api , which is where im seeing a 500 error. the documentation also looks like its for if youre not running with the docker container.
Code:
#espocrm
location ^~ /crm/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://127.0.0.1:18080/;
absolute_redirect off;
rewrite /crm(.*) $1 break;
}

Comment