<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ubuntu Archives - WP Encryption</title>
	<atom:link href="https://wpencryption.com/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>WordPress SSL Plugin</description>
	<lastBuildDate>Mon, 03 May 2021 10:03:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://wpencryption.com/wp-content/uploads/2020/04/cropped-icon-512-32x32.png</url>
	<title>Ubuntu Archives - WP Encryption</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Setup CRON Job to Restart Server Monthly Once</title>
		<link>https://wpencryption.com/restart-server-via-cronjob/</link>
		
		<dc:creator><![CDATA[wp_encryption]]></dc:creator>
		<pubDate>Mon, 03 May 2021 09:29:19 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Bitnami]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[OpenLightSpeed]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://wpencryption.com/?p=839</guid>

					<description><![CDATA[<p>This guide is focused towards step by step instructions on setting up a cron job on server to restart Apache/Nginx/Bitnami monthly once</p>
<p>The post <a href="https://wpencryption.com/restart-server-via-cronjob/">Setup CRON Job to Restart Server Monthly Once</a> appeared first on <a href="https://wpencryption.com">WP Encryption</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This guide is focused towards step by step instructions on setting up a cron job on server to restart Apache/Nginx/Bitnami monthly once so your latest SSL certificate is always loaded up automatically on frontend site without having to manually restart server.</p>



<p>First of all, You need to have<strong> root SSH</strong> <strong>access</strong> to your server. Otherwise, this method would not be possible as server restart requires <strong>sudo</strong> privileges and not something possible with your basic / jailed SSH access offered on shared hosting environments.</p>



<p>Further steps explained below:</p>



<p>1.  Login to your SSH console as <strong>root</strong> user.</p>



<p>2.  In case of <strong>Apache</strong> or <strong>Nginx</strong> server, please run the below command to identify your <strong>service</strong> path and make note of the path.</p>



<pre class="wp-block-code"><code>which service</code></pre>



<p>It will be something like <strong>/usr/sbin/service</strong></p>



<p>3. Run the below command to see which cron jobs you are already running.</p>



<pre class="wp-block-code"><code>crontab -l</code></pre>



<p>4. Start editing the crontab with <strong>nano</strong> editor using below command</p>



<pre class="wp-block-code"><code>crontab -e</code></pre>



<p>5. Using the service path you have noted, add a new monthly cron job line (runs on date 1 of each month) at the bottom of crontab editor in a new line as below</p>



<pre class="wp-block-code"><code>0 0 1 * * /usr/sbin/service apache2 restart > /monthlycron.log 2>&amp;1</code></pre>



<p>If you are using <strong>Nginx</strong> server, the above line should be,</p>



<pre class="wp-block-code"><code>0 0 1 * * /usr/sbin/service nginx restart > /monthlycron.log 2>&amp;1</code></pre>



<p>If you are using <strong>Bitnami server / Apache Lightsail</strong>, the above line should be,</p>



<pre class="wp-block-code"><code>0 0 1 * * /opt/bitnami/ctlscript.sh restart apache > /monthlycron.log 2>&amp;1</code></pre>



<p><strong>Note: </strong>Both success &amp; errors are logged in <strong>monthlycron.log</strong> file of root directory which will be helpful for debugging if server restart fails.</p>



<p>Press <strong>CTRL + O</strong> to save the crontab &amp; you are all set!. You can run <strong>crontab -l</strong> command to see the saved cron job.</p>



<p><strong>CAUTION:</strong> </p>



<p>In rare cases, If there is any error / typo in your server config file or if <strong>certificate.crt</strong>, <strong>private.pem</strong>, <strong>cabundle.crt</strong> files don&#8217;t exists in <strong>keys/</strong> directory of your WordPress directory, your server restart could fail and your site may become inaccessible on <strong>day 1 of month</strong>. In such case, you need to correct any error logged in <strong>monthlycron.log</strong> file, fix missing cert files in <strong>keys/</strong> directory and restart server once manually.</p>
<p>The post <a href="https://wpencryption.com/restart-server-via-cronjob/">Setup CRON Job to Restart Server Monthly Once</a> appeared first on <a href="https://wpencryption.com">WP Encryption</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to install SSL for WordPress on Apache server</title>
		<link>https://wpencryption.com/install-ssl-for-apache-server/</link>
		
		<dc:creator><![CDATA[wp_encryption]]></dc:creator>
		<pubDate>Thu, 03 Sep 2020 10:58:44 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[DOCS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Digital Ocean]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[SSL]]></category>
		<guid isPermaLink="false">https://wpencryption.com/?p=492</guid>

					<description><![CDATA[<p>Enable SSL module and install SSL for your Apache httpd or Apache2 server easily with step by step instructions</p>
<p>The post <a href="https://wpencryption.com/install-ssl-for-apache-server/">How to install SSL for WordPress on Apache server</a> appeared first on <a href="https://wpencryption.com">WP Encryption</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This tutorial assumes your site is running on an Apache server and you have sufficient SSH knowledge. You will need to have root SSH access to complete these changes.</p>



<h2 class="wp-block-heading">1. Login to your SSH console</h2>



<p>If you have Apache server running on cloud platforms like AWS or Digital Ocean, you might be able to login via SSH using <strong>Launch Console</strong> option. Otherwise, you can login using SSH key file or password via terminal.</p>



<h2 class="wp-block-heading">2. Determine your Apache server version</h2>



<p>If you are sure about having <strong>httpd</strong> or <strong>apache2</strong> server, please proceed to next step.</p>



<p>Running the below SSH commands will help you identify whether you have <strong>httpd</strong> or <strong>apache2</strong> server.</p>



<pre class="wp-block-code"><code>sudo systemctl is-enabled httpd</code></pre>



<pre class="wp-block-code"><code>sudo systemctl is-enabled apache2</code></pre>



<p>One of these will respond with <strong>enabled</strong>. Please follow below steps based on which server type is enabled.</p>



<h2 class="wp-block-heading">3. Install SSL for Apache httpd server</h2>



<p>Please run the below SSH command to install SSL module if not already installed:</p>



<pre class="wp-block-code"><code>sudo yum update -y</code></pre>



<pre class="wp-block-code"><code>sudo yum install -y mod_ssl</code></pre>



<p>If you have Linux 2, please run below command instead of above one</p>



<pre class="wp-block-code"><code>sudo yum install -y mod24_ssl</code></pre>



<h3 class="wp-block-heading">3a. Modify httpd config file with correct SSL paths</h3>



<p>Now it&#8217;s time to correct the SSL cert, key and ca bundle paths in default config file. CD into <strong>/etc/httpd/conf.d/</strong> and edit <strong>ssl.conf</strong> file</p>



<pre class="wp-block-code"><code>cd /etc/httpd/conf.d/</code></pre>



<pre class="wp-block-code"><code>sudo nano ssl.conf</code></pre>



<p>You need to look for <strong>SSLCertificateFile</strong>, <strong>SSLCertificateKeyFile</strong> &amp; <strong>SSLCACertificateFile</strong> lines. Assuming your site is hosted / stored in <strong>/var/www/</strong> directory and SSL certificates generated with <strong><a href="https://wordpress.org/plugins/wp-letsencrypt-ssl/" target="_blank" rel="noreferrer noopener">WP Encryption</a></strong> WordPress plugin stored in <strong>keys</strong> directory, modify the 3 lines to look like this:</p>



<pre class="wp-block-code"><code>SSLCertificateFile /var/www/keys/certificate.crt
SSLCertificateKeyFile /var/www/keys/private.pem
SSLCACertificateFile /var/www/wp-content/plugins/wp-letsencrypt-ssl/cabundle/ca.crt</code></pre>



<p>Save the file by pressing <strong>CTRL+O</strong> and exit editor with <strong>CTRL+X</strong>. <strong>CMD+O</strong> and <strong>CMD+X</strong> on Mac Terminal.</p>



<h3 class="wp-block-heading">3b. Restart httpd server for SSL changes to take effect</h3>



<p>Now we are done with the server config changes, it&#8217;s time to restart apache httpd server once for changes to take effect. Please run the below SSH commands to do so:</p>



<pre class="wp-block-code"><code>sudo systemctl restart httpd</code></pre>



<p>OR</p>



<pre class="wp-block-code"><code>sudo service httpd restart</code></pre>



<p>Your HTTPS site should be working perfectly now!.</p>



<h2 class="wp-block-heading">4. Install SSL for Apache2 server</h2>



<p>Enable SSL module using below command if not already enabled</p>



<pre class="wp-block-code"><code>sudo a2enmod ssl</code></pre>



<p><strong>cd /etc/apache2/ </strong>and check if <strong>sites-available</strong> &amp; <strong>sites-enabled</strong> directory exists. if exists &#8211; cd into <strong>sites-available</strong> and you should find a config file like <strong>default-ssl.conf</strong>. Using the default file name, Please run the below command to enable it and then modify this file,</p>



<pre class="wp-block-code"><code>sudo a2ensite default-ssl.conf
sudo nano default-ssl.conf</code></pre>



<p>If you don&#8217;t find <strong>sites-available</strong> &amp;<strong> sites-enabled</strong> directory, You should probably modify <strong>apache2.conf</strong> file.</p>



<p>You need to look for <strong>SSLCertificateFile</strong>, <strong>SSLCertificateKeyFile</strong> &amp; <strong>SSLCACertificateFile</strong> lines. Assuming your site is hosted / stored in <strong>/var/www</strong>/<strong>html/</strong> directory and SSL certificates generated with <strong><a href="https://wordpress.org/plugins/wp-letsencrypt-ssl/" target="_blank" rel="noreferrer noopener">WP Encryption</a></strong> WordPress plugin stored in <strong>keys</strong> directory, modify the 3 lines to look like this:</p>



<pre class="wp-block-code"><code>SSLCertificateFile /var/www/html/keys/certificate.crt
SSLCertificateKeyFile /var/www/html/keys/private.pem
SSLCACertificateFile /var/www/html/wp-content/plugins/wp-letsencrypt-ssl-pro/cabundle/ca.crt</code></pre>



<p>Save the file by pressing <strong>CTRL+O</strong> and exit editor with <strong>CTRL+X</strong>. <strong>CMD+O</strong> and <strong>CMD+X</strong> on Mac Terminal.</p>



<h3 class="wp-block-heading">4a. Restart Apache2 server for SSL changes to take effect</h3>



<p>Now we are done with the server config changes, it&#8217;s time to restart apache2 server once for changes to take effect. Please run the below SSH commands to do so:</p>



<pre class="wp-block-code"><code>sudo systemctl restart apache2</code></pre>



<p>OR</p>



<pre class="wp-block-code"><code>sudo service apache2 restart</code></pre>



<p>Your HTTPS site should be working perfectly now!.</p>
<p>The post <a href="https://wpencryption.com/install-ssl-for-apache-server/">How to install SSL for WordPress on Apache server</a> appeared first on <a href="https://wpencryption.com">WP Encryption</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
