linuxserver / docker-snipe-it

Alpine/Nginx container for the Asset Management software Snipe-IT
GNU General Public License v3.0
123 stars 26 forks source link

NGINX_APP_URL no longer working, defaulting to localhost #33

Closed bernhardmostrey closed 2 years ago

bernhardmostrey commented 2 years ago

Since the new update the NGINX_APP_URL override doesn't seem to be working well. All files and links use localhost as base, causing the CSS and pages to not work.

github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

caheredia commented 2 years ago

I'm having the same issue URLs read like http://localhost/licenses

Reverting to image: linuxserver/snipe-it:v5.3.7-ls159 fixed it

HoudayerPierre commented 2 years ago

Hello, same issue but not reverted to linuxserver/snipe-it:v5.3.7-ls159 to fix this, just added APP_URL as env var, with the same content of NGINX_APP_URL to fix the use of localhost as base.

089digit commented 2 years ago

Hello, my APP_URL=192.168.1.200:7818 in env NGINX_APP_URL: 192.168.1.200:7818 in Docker settings Don´t work. ??? https://localhost/login

robertocontreras86 commented 2 years ago

Anyone ever figure out a solution to this? I tried upgrading one of our test bench systems (synology running docker) and upgraded to 5.3.10 and still getting the same problem.

bernhardmostrey commented 2 years ago

@HoudayerPierre's solution worked for me!

089digit commented 2 years ago

can you help me how to config ?

robertocontreras86 commented 2 years ago

can you help me how to config ?

Hi, what type of environment are you trying to configure this is in?

089digit commented 2 years ago

When i try to open the website : 192.168.1.200:5623 it open https://localhost/login

i have a Docker on unraid NGINX_APP_URL: 192.168.1.200:5623 is the path to the snipe-it website and in the .env file APP_URL=192.168.1.200:5623 is the path to the snipe-it website

??

directe02 commented 2 years ago

if you need self fix modify file '/var/www/html/.env' in container

before

APP_URL=127.0.0.1

APP_TIMEZONE=US/Pacific

APP_LOCALE=en

after APP_URL=${NGINX_APP_URL} APP_TIMEZONE=${APP_TIMEZONE} APP_LOCALE=${APP_LOCALE}

test infomation Image: linuxserver/snipe-it:latest Image ID: docker-pullable://linuxserver/snipe-it@sha256:8d2d2f0afca8573997ed777f897127dad49e66f2b8bf046b2a6ef8f37c09012b Port: 80/TCP Host Port: 0/TCP State: Running Started: Wed, 23 Feb 2022 12:23:27 +0900