• 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
    • VBullentin with Vaultwiki behind SSL proxy does not save changes

    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 10 of 10

    Thread: VBullentin with Vaultwiki behind SSL proxy does not save changes

    • Thread Tools
      • Show Printable Version
    1. April 10, 2011 #1
      lordsilence
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      lordsilence is offline
      Junior Member
      Join Date
      June 10, 2010
      Posts
      8
      Rep Power
      0

      VBullentin with Vaultwiki behind SSL proxy does not save changes

      Hi

      I think we fixed this in the past but the 3.0.11 patch has reverted the change.

      The problem is when you try to save a page edit it doesnt save.
      Probilem description:

      Wiki is not saving edits - when you press sav you get: Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.
      Are you sure you want to continue sending this information?

      Pegasus, do you remember what we did to fix this the last time ?
      I think it was changing some POST url to not differentiate between http and https or something.
      Reply With Quote Reply With Quote

    2. April 10, 2011 #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
      687
      You're encountering this here? Or your site? I thought I have made edits here since adding SSL...

      The fix we used last time has been included in VaultWiki since then. Looking at the 3.0.11 source code, I see the fix applied in the appropriate spots. If you are still having issues, either the changes never had any effect, you copied over your fixed files with older files by mistake, or there has been some change to the proxy server you didn't notice before...

      Also, if you downloaded a patch rather than the full update, make sure you downloaded the right one. If you selected a changed-since version that is later than your previous install, you would have missed some changed files.

      If you cannot resolve this on your own, send me a PM.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. April 10, 2011 #3
      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
      687
      Found your problem. In order for VaultWiki to match the current URL protocol being used, it needs to be able to detect the current protocol. When HTTPS is being used, the PHP environment variable $_SERVER['HTTPS'] should be set to on or 1, but it isn't set in your configuration. This is something that you would set in your proxy configuration. Once you set this appropriately, you should no longer have issues.

      Keep in mind that VaultWiki doesn't force any redirect if the wrong protocol is used; it's agnostic. Whenever http is being used, your server is forcing a redirect. I feel like you shouldn't a redirect on POST requests to avoid data loss from form submissions.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    4. April 25, 2011 #4
      lordsilence
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      lordsilence is offline
      Junior Member
      Join Date
      June 10, 2010
      Posts
      8
      Rep Power
      0
      Yup, I agree this is the cause.

      The problem is I'm running a load balancer and an SSL accelerator infront of load balancer.
      Problem is backend wont see SSL at all, that is all handled by the SSL accelerator.

      Is there a way to force it to sent over https anyway?
      Reply With Quote Reply With Quote

    5. April 25, 2011 #5
      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
      687
      What are you using to achieve this? Can you be more specific about what code / server config is being used? Depending on your setup, you may be able to set the aforementioned PHP environment variable if the server can detect the request was passed through the proxy.

      Or if it is ALWAYS sent through the proxy (your site doesn't use regular HTTP at all), add the following to your vBulletin config file (includes/config.php) anywhere after the copyright block:
      Code:
      $_SERVER['HTTPS'] = 1;
      I think you can also set this as a default value either in php.ini or your http server config. In NginX we tell it to set HTTPS when the server proxies to PHP, technically this is possible even if the original request wasn't.

      Otherwise you're going to have to get creative and perhaps have the proxy set a custom header before passing the request on. Once PHP gets the request, you can set the variable if the header is present.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    6. May 2, 2011 #6
      lordsilence
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      lordsilence is offline
      Junior Member
      Join Date
      June 10, 2010
      Posts
      8
      Rep Power
      0
      I'm using varnish and "pound" infront of Varnish as the SSL accelerator.
      Varnish by itself doesnt do SSL but pound is used to solve this problem.

      I shall try this setting in config.php.
      Reply With Quote Reply With Quote

    7. May 2, 2011 #7
      lordsilence
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      lordsilence is offline
      Junior Member
      Join Date
      June 10, 2010
      Posts
      8
      Rep Power
      0
      Didnt seem like $_SERVER['HTTPS'] = 1; after the vbulletin copyright part helped.


      The proxy can set a special header.
      But isnt it better if vbform uses the relative path instead of full address?

      <form name="vbform" action="/forums/showwiki.php?title=Huginn&amp;do=edit" method="post" onsubmit="return

      instead of

      <form name="vbform" action="http://www.domain.com/forums/showwiki.php?title=Huginn&amp;do=edit" method="post" onsubmit="return

      Then it'll submit using whichever the browser is using.
      The search field and all other submit fields uses the relative path.
      Reply With Quote Reply With Quote

    8. May 2, 2011 #8
      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
      687
      If PHP is running as a CGI or FastCGI, you should also be able to set $_SERVER['HTTPS'] when the server passes a request to PHP. For example, in NginX's nginx.conf, we use:
      Code:
      			fastcgi_param HTTPS on;
      Otherwise, it looks like I was mistaken and that includes/config.php is 1 line too late in the code. If you are unable to set it when calling PHP, you'll have it add it to the beginning of includes/class_core.php and remember to put it there after every vBulletin upgrade.

      We don't use relative URLs because VaultWiki allows you to put your wiki on a custom sub-domain or non-forum path.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    9. May 9, 2011 #9
      lordsilence
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      lordsilence is offline
      Junior Member
      Join Date
      June 10, 2010
      Posts
      8
      Rep Power
      0
      Thanks, this seems to have fixed it
      I think the $_SERVER['HTTPS'] = 1; in class_core.php is the easiest and most portable solution for now.
      Reply With Quote Reply With Quote

    10. May 9, 2011 #10
      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
      687
      Added a new setting in VaultWiki 4 Alpha 1 that allows you to choose how the protocol for wiki URLs in enforced.

      Options are:
      • Auto-detect (recommended)
      • http://
      • https://

      In your case, you would want to select the 3rd option since auto-detect doesn't always work behind a proxy.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    Similar Threads

    1. Where Chapters Save
      By Gossamer in forum VaultWiki Questions
      Replies: 1
      Last Post: May 31, 2015, 11:57 AM
    2. Auto-Save Content
      By Lord Doys in forum VaultWiki Questions
      Replies: 2
      Last Post: April 16, 2012, 2:55 PM
    3. Rewriting nginx proxy to apache
      By Moses in forum VaultWiki Questions
      Replies: 2
      Last Post: August 10, 2010, 8: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 6:44 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.