You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to nginx, and I'm not sure I fully understand how this works.
Why the two separate rewrite rules, one in location @lychee invoked by try_files and one in if (!-e $request_filename)? I tried with the latter commented out and it still seemed to work.
Why location ~ \.php$? AFAICS Lychee has only one PHP file, index.php.
What is fastcgi_index index.php for? According to the documentation, it does something with $fastcgi_script_name. But I used log_format to view the value of $fastcgi_script_name and it looked correct (/lychee/index.php). Removing fastcgi_index didn't change anything.
Why the location ^~ /lychee instead of location /lychee?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
This FAQ suggests the following nginx configuration to serve Lychee from a subdirectory:
I'm new to nginx, and I'm not sure I fully understand how this works.
Why the two separate
rewriterules, one inlocation @lycheeinvoked bytry_filesand one inif (!-e $request_filename)? I tried with the latter commented out and it still seemed to work.Why
location ~ \.php$? AFAICS Lychee has only one PHP file,index.php.What is
fastcgi_index index.phpfor? According to the documentation, it does something with$fastcgi_script_name. But I usedlog_formatto view the value of$fastcgi_script_nameand it looked correct (/lychee/index.php). Removingfastcgi_indexdidn't change anything.Why the
location ^~ /lycheeinstead oflocation /lychee?This seems to be working for me:
All reactions