weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
1.84k stars 187 forks source link

How to install in specific subfolder #347

Closed hycday closed 1 year ago

hycday commented 2 years ago

Hi team,

I followed the install steps from https://github.com/weserv/images/blob/5.x/docker/README.md and install via docker worked like a charm.

However, I would like to access it via mydomain.com/weserv/?url=etc (versus today where it is as mydomain.com/?url= Could you please explain to a noobie how to achieve that ?

I use Ubuntu 20.04 TLS, with OpenLiteSpeed.

kleisauke commented 1 year ago

For that, you need to change the nginx configuration. For example, you could try changing this: https://github.com/weserv/images/blob/03684dc35801188ef12feed5219daf9da4b4c919/ngx_conf/imagesweserv.conf#L87

To:

    location /weserv { 

I use Ubuntu 20.04 TLS, with OpenLiteSpeed.

Note that this module is based upon nginx (which is BSD-2-Clause licensed) and not OpenLiteSpeed (which is GPLv3 licensed). So, your code must conform to the GPL when you use OpenLiteSpeed.

kleisauke commented 1 year ago

Closing due to inactivity. Please feel free to re-open if questions remain.