Set up SSL for MediaWiKi and WordPress
1, See this post to create self-sign SSL certificate. http://www.my-whiteboard.com/linux-admin/set-up-self-signed-ssl-certificate-for-wordpress.html
2, Install Admin-SSL (secure-admin) for WordPress (skip this step for MediaWiKi).
http://haris.tv/2007/04/24/admin-ssl-new-wordpress-plugin/
3, Edit your httpd.conf file, add the following lines to virtual host:
<Directory "/home/wordpress/webapps">
Options Indexes Includes FollowSymLinks
DirectoryIndex index.php index.html index.jsp
#Options +Includes
#AllowOverride all
AllowOverride All
Order deny,allow
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteCond %{SERVER_PORT} !^80$
RewriteRule !^wp-(admin|login|register)(.*) - [C]
RewriteRule ^(.*)$ http://%{SERVER_NAME}/$1 [L]
# For a site running on port 80 (http)
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^wp-(admin|login|register)(.*) https://%{SERVER_NAME}:10001/wp-$1$2 [L]RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</Directory>
4, Add the following lines to ssl.conf file:
SSLEngine on
SSLCertificateFile /home/wordpress/ssl/www.researchgrantdatabase.com.crt
SSLCertificateKeyFile /home/wordpress/ssl/www.researchgrantdatabase.com.key
SetEnvIf User-Agent “.*MSIE.*” nokeepalive ssl-unclean-shutdown<Directory “/home/wordpress/webapps”>
Options Indexes Includes FollowSymLinks
DirectoryIndex index.html index.php index.jsp
#Options +Includes
#AllowOverride None
AllowOverride All
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
5, Restart Apache
apachectl restart
Popularity: 2%


















































