HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Nginx configuration issue

I tried to run vanillaforums on nginx and set up nginx according to https://docs.vanillaforums.com/developer/backend/server-nginx/

but had an error with too many redirect, e.g. /index.php/index.php/index.php/index.php...

Is that page having issue?

And then tried https://github.com/vanilla/vanilla-docker/blob/master/resources/etc/nginx/sites-available/dev.vanilla.localhost.conf , but any links doesn't go anywhere, only top page can be viewed.

Finally, I could run vanilaforums by the follwing setting: https://pastebin.com/dapAFJ8T

But not elegant URI. How can nginx be configured?


OS: Debian GNU/Linux buster

nginx: 1.14.2

PHP: 7.3.4

Tagged:

Comments

  • R_JR_J Admin

    You can use the following lines:



       # Default path handling
       location / {
           try_files $uri @vanilla;
       }
    
       location @vanilla {
           fastcgi_param X_VANILLA 1;
           rewrite ^/(.+)$ /index.php?p=$1 last;
       }
    

    I'm not sure where I have that fastcgi_param X_VANILLA 1; from and if it is needed...

    You might need to add $Configuration['Garden']['RewriteUrls'] = true; to your /conf/config.php

  • Great! Thanks a lot! :)

Sign In or Register to comment.