Set Up Self-Signed SSL Certificate for WordPress

No GoodNeed ImprovementOKGoodExcellent (1 votes, average: 5 out of 5)
Loading ... Loading ...

You can use self-signed SSL certificate for WordPress admin.

1. Home-made Self-Signed SSL Certificate

1.1, Use this command to generate a private key.

openssl genrsa -des3 -out www.my-whiteboard.com.key 1024

Generating RSA private key, 1024 bit long modulus
..++++++
…….++++++
e is 65537 (0×10001)
Enter pass phrase for www.my-whiteboard.com.key:
Verifying - Enter pass phrase for www.my-whiteboard.com.key:

1.2 Generate a CSR (Certificate Signing Request)

openssl req -new -key www.my-whiteboard.com.key -out www.my-whiteboard.com.csr

Enter pass phrase for www.my-whiteboard.com.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—-
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:Maryland
Locality Name (eg, city) []:Rockville
Organization Name (eg, company) [Internet Widgits Pty Ltd]:www.my-whiteboard.com
Organizational Unit Name (eg, section) []:IT Services
Common Name (eg, YOUR name) []:www.my-whiteboard.com
Email Address []:xxx@gmail.comPlease enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:my-whiteboard.com

1.3 Remove Passphrase from Key

openssl rsa -in www.my-whiteboard.com.key_orig -out www.my-whiteboard.com.key

Enter pass phrase for www.my-whiteboard.com.key_orig:
writing RSA key

1.4, Create a self-signed certificate

openssl x509 -req -days 3650 -in www.my-whiteboard.com.csr -signkey www.my-whiteboard.com.key -out www.my-whiteboard.com.crt

Signature ok
subject=/C=US/ST=Maryland/L=Gaithersburg/O=www.my-whiteboard.com/OU=IT Services/CN=www.my-whiteboard.com/emailAddress=xxx@gmail.com
Getting Private key

1.5 Edit your Apache server’s ssl.conf file, add the following lines for your web site (virtualhost configuration).

<VirtualHost 100.101.102.103:443>
ServerName www.my-whiteboard.com
DocumentRoot /home/xxx/webapps
SuexecUserGroup root root
Options Indexes Includes FollowSymLinks
ServerAlias “mail.my-whiteboard.com” “ftp.my-whiteboard.com”
ServerAdmin “xxxx@gmail.com”
DirectoryIndex index.html index.php index.jspErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warnSSLEngine on
SSLCertificateFile /home/xxx/www.my-whiteboard.com.crt
SSLCertificateKeyFile /home/xxx/www.my-whiteboard.com.key
SetEnvIf User-Agent “.*MSIE.*” nokeepalive ssl-unclean-shutdown <Directory “/home/xxx/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></VirtualHost>

1.6, Restart Apache

apachectl restart

ps -ef |grep httpd

apache 4345 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd
apache 4346 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd
apache 4347 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd
apache 4348 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd
apache 4349 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd
apache 4350 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd
apache 4351 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd
apache 4352 3197 0 09:32 ? 00:00:00 /usr/sbin/httpd

2. Install WordPress SSL Plugin for Secure-Admin

2.1, Download WordPress SSL Plugin for Secure-Admin from http://haris.tv/.

2.2, Extract the zip file and copy secure-admin.php to the /wp-content/plugins/ directory.

2.3, Log into the WordPress admin panel and click on the Plugins button

2.4, Locate the secure-admin listing and click Activate

3. Test ssl web connection

https://www.my-whiteboard.com

Because the certificate was not generated from Trusted CA root certificates and does not offer any third-party proof to validate your site’s identity, most browsers will show warning/error message similar to these.

Popularity: 2%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word