joshp23 / YOURLS-IQRCodes

YOURLS QRCode plugin with exposed options and full integration
GNU General Public License v3.0
22 stars 11 forks source link

404 for /srv/ #21

Closed tofuSCHNITZEL closed 7 years ago

tofuSCHNITZEL commented 7 years ago

I use nginx and I get a 404 when calling https:///srv/....... regular short urls work fine... maybe there is a problem with the symlinks? I checked them and they point to the correct files.

joshp23 commented 7 years ago

Are you getting the 404 when trying to visit an image url or the naked url itlsef?

Currently, navigating directly to https://whatever.tld/srv/ should yield FAIL: missing id. If this is not the case then I would check:

I am wondering if you added a preceding and/or trailing slash to your cache location setting in the admin page? Go to https://whatever.tld/admin/plugins.php?page=iqrcodes#stat_tab_options and look at the cache location setting, make sure there is no proceeding or trailing slash.

Other than that, I would need more information.

tofuSCHNITZEL commented 7 years ago

Both: e.g. this url gives me an 404: https://dom.tld/srv/?id=iqrcodes&key=9ada5c024108cc4c72718aa2a7810811&fn=qrc_785f4f42e774d3e54bba057f1d60414a.png

also calling https://dom.tld/srv/ -> 404 calling https://dom.tld/pages/srv.php?id=iqrcodes&key=9ada5c024108cc4c72718aa2a7810811&fn=qrc_785f4f42e774d3e54bba057f1d60414a.png gives me "FAIL: bad access key"

permissions are ok. I created the symlink like this: ln -s /httpdocs/user/plugins/iqrcodes/assets/qrchk.php /httpdocs/pages/qrchk.php (also for srv)

no slashes at the beginning or end of cache location

joshp23 commented 7 years ago

did you try to just copy the files over? perhaps your nginx setup has something against symlinks?

tofuSCHNITZEL commented 7 years ago

Symlinking was not the issue but the nginx directive suggested by yourls (try_files $uri $uri/ /yourls-loader.php;) I had to use the directive that I also use for wordpress installations:

if (!-e $request_filename){ rewrite ^(.+)$ /yourls-loader.php?q=$1 last; }

joshp23 commented 7 years ago

Thank you for that. I'll add it to the README, glad you found the problem.

PrieserMax commented 11 months ago

Hey, I have a similar issue, running YOURLS behind a Nginx reverse proxy (Nginx Proxy Manager). Where would I have to change that? I have entered it in my custom config in the Nginx Proxy. Same behavior as before. Sometimes it works, sometimes it fails :(

Then that appears: error When using the short-link followed by .qr it always works.

Greetings from Germany Max