Closed mlapaglia closed 7 months ago
You need to set APP_URL
env variable to the IP Address
what port is https on? i tried using 443 but it doesn't respond.
it does respond, but it all the queries you are making afterwards are blocked by the CSP. That is because you are trying to fetch http on the data. You need to set you APP_URL with the https prefix.
ok switched it to the 443, the site isn't responding to 443 it still works on 80 though
docker run -d
-e 'APP_URL'='https://192.168.1.164:4880/'
-p '4879:80/tcp'
-p '4880:443/tcp'
docker run -d
-e 'APP_URL'='http://192.168.1.164'
-p '4879:80/tcp'
you can't use https without setting a certificate or using a reverse proxy. Our docker image only opens port 80.
If you use a reverse proxy which takes care of https (and the certificate) and redirect then traffic to 80, then you will need to set your APP_URL to https.
You can have a look at #175
Ok here is my reverse proxy settings:
APP_URL is now https://MYDOMAIN.com/
it's still requesting http urls though
when i try to access the site locally again it tries to use the https MYDOMAIN
You can have a look at #175
this just seems like a bunch of workarounds? is there any documentation about using a reverse proxy? i've had it running for years but v5 has made it stop working.
this just seems like a bunch of workarounds?
I'm also just a user, who struggled with similar problems. That's the reason why I created https://github.com/LycheeOrg/Lychee-Docker/issues/175.
Did you modify /etc/nginx/nginx.conf
within the container (fastcgi_param HTTPS on;
)? I guess this is the missing piece.
Did you modify /etc/nginx/nginx.conf within the container (fastcgi_param HTTPS on;)? I guess this is the missing piece.
That should not be necessary as long as the reverse proxy is forwarding https headers.
I'll try to improve the description for Apache, but I can't really do much for the nginx one as I don't have knowledge there. Furthermore, I strongly suggest to use docker compose rather than docker from cli.
I can lend a hand if you can show me how to record the headers being forwarded. is there something special about lychee that makes it work different than many other docker containers i forward the same way to? could the APP_URL be omitted and the site serve up content to whatever requests it?
same for me. Something is wrong with this APP_URL.
after starting with
-e APP_URL=192.168.1.4
the image URL is rendered as:
which renders 404 NotFoundHttpException
172.17.0.1 - - [09/Jan/2024:18:08:57 +0100] "GET /192.168.1.4:13380/uploads/medium/dd/3e/a8aef076afeda630245b0b0e1b18.jpg HTTP/1.1" 404 48505 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15" "-" 172.17.0.1 - - [09/Jan/2024:18:08:57 +0100] "GET /192.168.1.4:13380/uploads/small2x/dd/3e/a8aef076afeda630245b0b0e1b18.jpg HTTP/1.1" 404 48492 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15" "-" 172.17.0.1 - - [09/Jan/2024:18:08:57 +0100] "GET /192.168.1.4:13380/uploads/small2x/18/43/cd5f57bed44befc5b50bfa63fb9a.jpg HTTP/1.1" 404 48495 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15" "-"
ok, adding http:// helps:
-e APP_URL=http://192.168.1.4:13380 \
but do we need this env after all? what about if I'm serving the app on multiple different domains?
Should be resolved with latest builds.
running
is there any documentation for how to get it up and running successfully?
docker run -p 80 lycheeorg/lychee
creates a site that images can't be viewed after uploading them, looks like it's trying to get images fromlocalhost