[pmwiki-users] https with PmWiki

Patrick R. Michaud pmichaud at pobox.com
Tue May 30 16:38:09 CDT 2017


PmWiki *already* responds properly to https: requests -- it detects when a request comes in via HTTPS and converts its outgoing links accordingly.  This doesn't need a new variable.

If you want to force all pmwiki-links to use https, then update $ScriptUrl accordingly:

   $ScriptUrl = 'https://www.mydomain.com/path/to/pmwiki.php';

Chances are that a site is already setting $ScriptUrl in the local/config.php anyway -- it's one of the first things mentioned in docs/sample-config.php, and in the initial setup task documents.

I'd be fine with updating docs/sample-config.php to include something like:

   # If you prefer HTTPS over HTTP linkages:
   # $UrlScheme = 'https';
   # $ScriptUrl = 'https://www.mydomain.com/path/to/pmwiki.php';
   # $PubDirUrl = 'https://www.mydomain.com/path/to/pub';

And yes, it makes sense to have this information in the standard PmWiki documentation as well.  I suggest it can go into http://www.pmwiki.org/wiki/PmWiki/InitialSetupTasks , e.g. in the part that mentions setting up $ScriptUrl and $PubDirUrl .  Or it can go into http://www.pmwiki.org/wiki/PmWiki/Security .  Or both.

If you want to have PmWiki automatically redirect incoming HTTP requests to be a HTTPS request... that sounds recipe-ish to me.  And it's much more efficient for it to be handled at the webserver level anyway (e.g., vi .htaccess, Redirect, etc.)

Pm

On Tue, May 30, 2017 at 05:19:54PM -0400, Peter Kay wrote:
> Perhaps
> 
> $forcehttps=1;
> or
> $requirehttps=1;
> 
> On Tue, May 30, 2017 at 6:11 AM, Simon <nzskiwi at gmail.com> wrote:
> > Good idea,
> > having now addressed the mobile friendly issue (i.e. getting google to give
> > your website credence) I agree that pmwiki.org.should move to https for
> > better google ranking and importantly
> > I'd like to see a PmWiki (rather than cookbook) documentation page on this
> > subject, and also an OOTB option (e.g. a config.php setting
> > [$enablehttps=1;]) for installing PmWiki with HTTPS enabled
> >
> > thanks
> > Simon
> >
> > ____
> > http://kiwiwiki.nz
> >
> > On 30 May 2017 at 01:03, Thomas Lundgren <publik at lundgren.nu> wrote:
> >>
> >> It´s seems that the era of http soon will end and https will (continue) to
> >> live long and prosper...
> >>
> >> When looking for how to make my PmWiki-installations more prosper and
> >> serve pages with ssl/https i found this page;
> >>
> >> http://www.pmwiki.org/wiki/Cookbook/SwitchToSSLMode
> >>
> >> The tips and instructions on that page are rather old. Are they still
> >> valid and "best practice" or are there any new tips and information that I
> >> can use?
> >>
> >> My installations contains a standard PmWiki (with some cookbooks...),
> >> Apache running on a FreeBSD-server that I have total control over.
> >>
> >> Thank you!
> >>
> >> Best regards,
> >> / Thomas.
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> pmwiki-users mailing list
> >> pmwiki-users at pmichaud.com
> >> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
> >
> >
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users
> >
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users



More information about the pmwiki-users mailing list