• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki How-Tos
    • VaultWiki Questions
    • Blank page on wiki root

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Results 1 to 7 of 7

    Thread: Blank page on wiki root

    • Thread Tools
      • Show Printable Version
    1. April 10, 2013 #1
      beernuts
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      beernuts is offline
      Junior Member
      Join Date
      May 11, 2011
      Posts
      11
      Rep Power
      0

      Blank page on wiki root

      We are attempting to move our large installation from Apache to nginx. In testing, everything has been working fine, save for Vaultwiki. When we load up the wiki root, all we get is a blank page. Nothing is recorded in the error logs on these requests. Accessing the wiki does result in the access log recording the request, however, so I know that the domain mapping is correct. I can place an arbitrary PHP file in our wiki root and visit it and it executes fine. Only Vaultwiki is having an issue with the migration.

      What are some things I need to try? I already opened up the vw_config.php and it is correct. As a matter of fact, if I change the VB root directive in that file to be wrong, I get an internal server error.

      So I know that vaultwiki is being executed. It just isn't working.

      Also, are there any nginx rewrite rules already written for vaultwiki?
      Reply With Quote Reply With Quote

    2. April 10, 2013 #2
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      First thing you should try is modify vw_config.php and add the following:
      Code:
      ini_set('display_errors', 1);
      If you get an error after doing this, then it may not be a problem with the rewrite rules.

      However, nginx rewrite rules are a completely different animal. It may be something simple like nginx not telling PHP about the original request correctly. Please post your existing location blocks so we can see what, if anything, might need to be changed. Also please include your current Apache rules so we know how you expect it to be when it's done.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. April 10, 2013 #3
      beernuts
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      beernuts is offline
      Junior Member
      Join Date
      May 11, 2011
      Posts
      11
      Rep Power
      0
      Our current apache rewrite is very simple:

      Code:
      RewriteEngine On
      RewriteBase /
      
      RewriteRule ^Main:(.*)$ $1 [L,R=301]
      
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)?$ showwiki_proxy.php [L,QSA]
      We haven't even tried doing anything funny with nginx yet as far as rewrites. I just assumed that loading up index.php would generate the wiki index page. Our nginx location directive for the wiki subdomain is:

      Code:
      server {
        server_name wiki.site.com;
        root "/home/site/public_html/wiki";
      
        index index.php;
        client_max_body_size 10m;
      
        access_log /home/site/_logs/wiki.access.log;
        error_log /home/site/_logs/wiki.error.log;
      
      
      
        location / {
          try_files $uri $uri/ /showwiki_proxy.php;
        }
      
        location ~ "^(.+\.php)($|/)" {
          fastcgi_split_path_info ^(.+\.php)(.*)$;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param SCRIPT_NAME $fastcgi_script_name;
          fastcgi_param PATH_INFO $fastcgi_path_info;
          fastcgi_param SERVER_NAME $host;
          fastcgi_pass 127.0.0.1:9000;
          include        fastcgi_params;
        }
      }
      Quote Originally Posted by pegasus View Post
      nginx rewrite rules are a completely different animal. Please post your existing location blocks so we can see what, if anything, might need to be changed. Also please include your current Apache rules so we know how you expect it to be when it's done.
      Reply With Quote Reply With Quote

    4. April 10, 2013 #4
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      Unfortunately try_files cannot be used with PHP files. It has the unwanted behavior of not passing the request to the .php location block.

      Code:
      server {
        server_name wiki.site.com;
        root "/home/site/public_html/wiki";
      
        index index.php;
        client_max_body_size 10m;
      
        access_log /home/site/_logs/wiki.access.log;
        error_log /home/site/_logs/wiki.error.log;
      
        location /vault {
            rewrite ^ $uri last;
        }
      
        location / {
              if ($request_uri !~ \.(?:php|js|css)) {
      	     set $redirect_url $fastcgi_script_name;
      
      	     rewrite ^ /showwiki_proxy.php last;
              }
        }
      
        location ~ "^(.+\.php)($|/)" {
          fastcgi_split_path_info ^(.+\.php)(.*)$;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param SCRIPT_NAME $fastcgi_script_name;
          fastcgi_param PATH_INFO $fastcgi_path_info;
          fastcgi_param SERVER_NAME $host;
          fastcgi_param REDIRECT_URL $redirect_url;
          fastcgi_pass 127.0.0.1:9000;
          include        fastcgi_params;
        }
      }
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    5. April 10, 2013 #5
      beernuts
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      beernuts is offline
      Junior Member
      Join Date
      May 11, 2011
      Posts
      11
      Rep Power
      0
      Your statement confuses me. We use try_files exclusively on vbulletin, wordpress, joomla, and other PHP sites without issue. The try_files and PHP location block are identical to what we use on wordpress for rewrites.

      Granted, your configuration works, but I don't understand why. We are trying to stay away from if in our configurations as much as possible due to http://wiki.nginx.org/IfIsEvil
      Reply With Quote Reply With Quote

    6. April 10, 2013 #6
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      From a technical standpoint, try_files doesn't maintain the original request on its own. It also expects that the found file takes URL parameters in the same format as the original request. When it doesn't, you need to use rewrite instead. Also, once you start using more complex rules, such as those for vBSEO, or for vBulletin 4 and VaultWiki combined, try_files is no longer adequate, because you need to test more than just "Does this file exist?"

      I am aware of the IfIsEvil article from when we started using nginx here. But since that article was written nearly 2 years ago, there have been a lot of updates to nginx and some of the issues with if being quirky were fixed.

      Still it doesn't always function exactly the way you might expect. It's not that if should be avoided completely, because as the article mentions, it is necessary in some situations - which you will typically run into if you use more than one software that was not written by you, or software that wasn't designed with nginx in mind.

      It's better to try to understand if, rather than avoid it completely. Here is a good article: http://agentzh.blogspot.com/2011/03/...-if-works.html

      A good rule of thumb when using if inside location blocks... make sure that every if block has a unique condition, so that only one if block will execute.

      You have to be careful with location blocks themselves too: only the first block to match will be executed, unless the location changes, or a later block has an even more qualified condition. You'll start really loving nginx when you have location blocks for different softwares in different sub-directories, and then discover that the .php block never gets executed.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    7. April 10, 2013 #7
      beernuts
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      beernuts is offline
      Junior Member
      Join Date
      May 11, 2011
      Posts
      11
      Rep Power
      0
      I appreciate your help here. We're still learning the nginx ways along with its little nuances.
      Reply With Quote Reply With Quote

    Similar Threads

    1. Supermod when editing a wiki page displays a blank page (Vbulletin)
      By migratoria in forum General Discussion
      Replies: 13
      Last Post: January 17, 2016, 2:31 PM
    2. Idea: include wiki page in Forum Post (wiki/forum integration)
      By InformationNirvana in forum Ideas & Suggestions
      Replies: 2
      Last Post: December 14, 2011, 12:56 AM
    3. [Miscellaneous Hacks] Newest Wiki pages link, in Forumhome, and in Wiki front page
      By basketmen in forum vBulletin 3.x Addons
      Replies: 5
      Last Post: July 27, 2011, 4:45 AM
    4. Script name for wiki page?
      By iphoneclub in forum VaultWiki Questions
      Replies: 2
      Last Post: May 8, 2010, 8:25 PM
    5. Blank Page Error
      By pegasus in forum VaultWiki Questions
      Replies: 0
      Last Post: October 20, 2008, 11:20 PM

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  
    • BB code is On
    • Smilies are On
    • [IMG] code is Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 1:49 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.