Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Vanilla on Nginx
I'm trying to install Vanilla 2 on Nginx but am facing 404 Page not found error. After some searching I figured it is url rewrite error. So, tried to translate Apache's rewrite rule:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
as:
if (!-e $request_filename
{
rewrite ^(.*)$ index.php?q=$1 last;
}
But obviously I'm doing something wrong.
Can you help me, please.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
as:
if (!-e $request_filename
{
rewrite ^(.*)$ index.php?q=$1 last;
}
But obviously I'm doing something wrong.
Can you help me, please.
0
Comments
/forum/index.php/garden/gardensetup
How do I get rid of /index.php/ on everything?
$Configuration['Garden']['RewriteUrls'] = TRUE;
Thanks, people!
$_SERVER['PATH_INFO'] = preg_replace('|^/forum|','', $_SERVER['REQUEST_URI']);
/forum being my root. In nginx, all I have is:
location /forum/ { try_files $uri /forum/$uri/ /forum/index.php?$uri; }
Seems to work fine: http://www.checkfront.com/forum/
Cheers,
-J
I must be a total newbie at this. But Im getting the same error "No Input file Specified"
- I cant find the config.php file. There seems to not be a config.php file in Vanilla 2 RC1. But I do see a config-default.php in the config folder.
2. I do not know if all these fixes listed above applies to me since I have godaddy deluxe hosting which is linux. Anyone know where kind this is?
3. Ive actually cmodded my whole directories and subfolders/files with 777. Yes I know this is very insecure, but I wanted to see if this would solve the problem and thats a Negative.
Id really appreciate some help for the php not inclined person. Id like a step by step guide on how to do this just like a little child if possible.
Thanks for all you do!
However, When i point my browser to the install folder, in this case "Forum", I get the error "No input File Specified"
Further details is, I point it to the folder like this: http://forum.xxxxxxxx.com/forum
and I get this: www.forum.xxxxxxx.com/forum/index.php/dashboard/setup
Again any help would be appreciated.
-Tim
Vanilla Forums COO [GitHub, Twitter, About.me]
location /forums { try_files $uri $uri/ /forums/index.php?$uri; } location ~ .php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; include fastcgi_params; fastcgi_intercept_errors on; }
path info is empty
if I add: fastcgi_param PATH_INFO $request_uri;
then path info is /forums/post/discussion
every page is the index page
I'm using this url in the browser to test each change, until I see something that looks right. domain.com/forums/post/discussion
_SERVER["QUERY_STRING"] no value
_SERVER["SCRIPT_NAME"] /forums/post/discussion
_SERVER["SCRIPT_FILENAME"] /var/www/domain.com/forums/index.php
_SERVER["REQUEST_URI"] /forums/post/discussion
_SERVER["DOCUMENT_URI"] /forums/post/discussion
_SERVER["DOCUMENT_ROOT"] /var/www/domain.com
_SERVER["PATH_INFO"] no value
_SERVER["PATH_TRANSLATED"] /var/www/domain.com
_SERVER["PHP_SELF"] /forums/post/discussion
If I visit /forums/post/discussion in the browser, I'm currently seeing the default front page, but the paths to the css, js, etc.. are all incorrect and looking for the paths to these files from the document root instead of from /forums where my install is.
I hope this helps a bit more in diagnosing my issue.
location /forums { if (!-e $request_filename) { rewrite ^/forums(.+)$ /forums/index.php?p=$1 last; } }
The server variables are:
script_filename => /var/www/domain.com/forums/index.php
script_name => /forums/index.php
query_string => p=/post/discussion
request_uri => /forums/post/discussion
path_info =>
path_translated => /var/www/domain.com
php_self => /forums/index.php
Previously with /index.php?p=$uri; one could not get http://domain.tld/search?Search=abc to work due to args not being proxied. For forums which are in non-root directories, the following should work: Also, don't be an idiot like myself and set
$Configuration['Garden']['RewriteUrls'] = TRUE;
in conf/config.php instead of wondering why pretty urls aren't working!