The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

Nginx + Slim in Sub Directory

giggsey's Avatar


10 Nov, 2012 03:49 PM

Trying to use Slim in a subdirectory /data/.

My nginx config has:

  location /data/ {
            try_files $uri $uri/ /data/index.php;

That works, and my routes work, however, due to a library I'm using (LightOpenID), I need to use $_GET, which appears empty when I open

  1. Support Staff 1 Posted by Brian Nesbitt on 14 Nov, 2012 04:59 AM

    Brian Nesbitt's Avatar

    Slim doesn't affect the global $_GET variable.

    What about the rest of your nginx config... did you follow:

    Specifically the include fastcgi_params; which will include the query string parameters and etc to be passed on to the fastcgi processor (ie PHP).

  2. 2 Posted by giggsey on 15 Nov, 2012 12:52 PM

    giggsey's Avatar

    I fixed it by changing my try_files line to:

    try_files $uri $uri/ /data/index.php?$args;
  3. giggsey closed this discussion on 15 Nov, 2012 12:55 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac