Server-Admin-Log: Unterschied zwischen den Versionen

Aus Open Source Ecology - Germany
Zur Navigation springen Zur Suche springen
Zeile 86: Zeile 86:
 
File: '''.../wiki/LocalSettings.php'''
 
File: '''.../wiki/LocalSettings.php'''
  
set http to '''https'''
+
replace line
  
 
<source lang="php">
 
<source lang="php">
Zeile 92: Zeile 92:
 
</source>
 
</source>
  
Wiki HTTPS is now enabled and HTTP will redirected to HTTPS automatically
+
with this lines
 +
 
 +
<source lang="php">
 +
$wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
 +
$wgServer = $wgProto."://wiki.opensourceecology.de";
 +
</source>
 +
 
 +
Wiki HTTP is now selectable.
 +
 
 +
----
 +
 
 +
activate HTTPS Login with selectable redirection back to HTTP after login
 +
 
 +
add line in LocalSettings.php
 +
 
 +
<source lang="php">
 +
$wgSecureLogin=true;
 +
</source>
 +
 
 +
 
 +
 
 +
 
  
 
[[Category: Logs]]
 
[[Category: Logs]]

Version vom 28. Februar 2013, 10:54 Uhr

Create a own SSL certificate

http://mathias-kettner.de/lw_ca_zertifikat_erstellen.html

I created a certificate but I've seen that there already exists a cerificate (already using on mail.opensourceecology.de)


Add HTTPS on login pages of the Wiki and Forum --Tony Ford (talk) 23:26, 23 February 2013 (CET)

File: /etc/apache2/ports.conf

add line

NameVirtualHost *:443

to resolve the message at apache restart

[warn] _default_ VirtualHost overlap on port 443, the first has precedence





File: /ect/apache2/sites-enabled/...wiki

inserted https section

File: /ect/apache2/sites-enabled/...forum

inserted https section

File: /ect/apache2/sites-enabled/...blog

inserted https section

insert https section

duplicate the lines

<VirtualHost *:80> ... </VirtualHost>

adjust the duplicate the portnumber from 80 to 443

insert the following lines to enable SSL (HTTPS)

 # SSL Einschalten
 SSLEngine on
 # Das Zertifikat für den Server
 SSLCertificateFile [URL_to_Servercert]
 # Die Schlüsseldatei für den Server
 SSLCertificateKeyFile [URL_to_Serverkey]


Redirect from HTTP to HTTPS (only for information)

following lines inside the VirtualHost *:80 -tags would redirect HTTP to HTTPS.

This is only for information! It will not applied!


RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://wiki.opensourceecology.de/%{REQUEST_URI} [R,L]




Adjust the wiki LocalSettings.php

File: .../wiki/LocalSettings.php

replace line

$wgServer           = "https://wiki.opensourceecology.de";

with this lines

$wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
$wgServer = $wgProto."://wiki.opensourceecology.de";

Wiki HTTP is now selectable.


activate HTTPS Login with selectable redirection back to HTTP after login

add line in LocalSettings.php

$wgSecureLogin=true;