<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: How to Redirect HTTP to HTTPS on Apache	</title>
	<atom:link href="https://www.tecmint.com/redirect-http-to-https-on-apache/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/redirect-http-to-https-on-apache/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Thu, 17 Dec 2020 14:13:04 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Frag		</title>
		<link>https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1402065</link>

		<dc:creator><![CDATA[Frag]]></dc:creator>
		<pubDate>Thu, 17 Dec 2020 14:13:04 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=26628#comment-1402065</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1346466&quot;&gt;Kcaldera78&lt;/a&gt;.

Tons of misspellings that cause syntax errors in the code above.  This causes more problems than solutions.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1346466">Kcaldera78</a>.</p>
<p>Tons of misspellings that cause syntax errors in the code above.  This causes more problems than solutions.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aleksandar Gvozden		</title>
		<link>https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1379633</link>

		<dc:creator><![CDATA[Aleksandar Gvozden]]></dc:creator>
		<pubDate>Fri, 23 Oct 2020 14:37:24 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=26628#comment-1379633</guid>

					<description><![CDATA[Also, if you using LetsEncrypt certification, add this before redirect rule:
&lt;pre&gt;
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^\.well-known/.+ - [END]
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>Also, if you using LetsEncrypt certification, add this before redirect rule:</p>
<pre>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^\.well-known/.+ - [END]
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kcaldera78		</title>
		<link>https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1346467</link>

		<dc:creator><![CDATA[Kcaldera78]]></dc:creator>
		<pubDate>Wed, 22 Jul 2020 14:05:42 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=26628#comment-1346467</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1346466&quot;&gt;Kcaldera78&lt;/a&gt;.

Correction to step 2)

Modify &lt;strong&gt;/private/etc/apache2/httpd.conf&lt;/strong&gt; file:

##Change the following lines to the folder path where the web files are located:
&lt;pre&gt;
DocumentRoot &quot;/Library/WebServer/Documents/xxxx&quot;
Directory &quot;/Library/WebServer/Documents/xxxxx&quot;
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1346466">Kcaldera78</a>.</p>
<p>Correction to step 2)</p>
<p>Modify <strong>/private/etc/apache2/httpd.conf</strong> file:</p>
<p>##Change the following lines to the folder path where the web files are located:</p>
<pre>
DocumentRoot "/Library/WebServer/Documents/xxxx"
Directory "/Library/WebServer/Documents/xxxxx"
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kcaldera78		</title>
		<link>https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1346466</link>

		<dc:creator><![CDATA[Kcaldera78]]></dc:creator>
		<pubDate>Wed, 22 Jul 2020 14:03:39 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=26628#comment-1346466</guid>

					<description><![CDATA[Thank you for the info. This helped me set up HTTP to HTTPS redirects in OS X 10.14 Mojave. Apple has moved away from its own implementation with OSX 10.14 Mojave, and OSX 10.15 Catalina, so you have to install open-source Apache to get web services working. I had experience deploying Apache in Linux, but not familiar with the steps that were required to get it working on an OSX platform.

Here is what you need to do for OSX 10.14 Mojave:

1) Enable Apache on OSX:
&lt;pre&gt;
# sudo -s
# cd /private/etc/apache2
# cp ./httpd.conf ./httpd.conf.bak
# apachectl start
&lt;/pre&gt;
2) Modify &lt;strong&gt;/private/etc/apache2/httpd.conf&lt;/strong&gt; file:
&lt;pre&gt;
## Uncomment the following lines:
LoadModule socache_shmcb_module lib/httpd/modules/mod_socache_shmcb.so
LoadModule ssl_module lib/httpd/modules/mod_ssl.so
LoadModule alias_module libexec/apache2/mod_alias.so
Include /private/etc/apache2/extra/httpd-ssl.conf
Includ /private/etc/apache2/extra/httpd-vhosts.conf
##Change the following lines to the folder path where the web files are located:
DocumentRoot &quot;/Library/WebServer/Documents/xxxx&quot;
&lt;/pre&gt;
3) Modify &lt;strong&gt;/private/etc/apache2/httpd-ssl.conf&lt;/strong&gt; file:
&lt;pre&gt;
# cp ./httpd-ssl.conf ./httpd-ssl.conf.bak
&lt;/pre&gt;
Add following:
&lt;pre&gt;
Listen 443
SSLEngine on

##Change the following lines to the folder path where the SSL certificate and key are located:
SSLCertificateFile &quot;/private/etc/apache2/server.crt&quot;
SSLCertificateKeyFiel &quot;/private/etc/apache2/server.key&quot;
&lt;/pre&gt;
4) Modify &lt;strong&gt;/private/etc/apache2/httpd-vhosts.conf&lt;/strong&gt; file.
&lt;pre&gt;
# cp ./httpd-vhost.conf ./httpd-vhost.conf.bak
&lt;/pre&gt;
Add following:
&lt;pre&gt;
&#060;VirtualHost *:80&#062;
  ServerName Server.domainname.com
  Redirect permanent / https://server.domainname.com
&#060;/VirtualHost&#062;
&#060;VirtualHost *:443&#062;
  ServerAdmin admin@domainname.com
  DocumentRoot &quot;/Library/WebServer/Document/xxxx&quot;
  ServerName server.domainname.com
  SSLcertificateFile &quot;/private/etc/apache2/server.crt
  SSLCertificateKeyFile &quot;/private/etc/apache2/server.key&quot;
  ErrorLog /private/var/log/apache2/server-error_log
  CustomLog /private/vart/log/apache2/server-access_log common
&#060;/VirtualHost&#062;
&lt;/pre&gt;
5) Test the Apache configuration for errors after restarting Apache.
&lt;pre&gt;
# apachectl configtest
httpd -v (Apache Version)
&lt;/pre&gt;
6) Restart apache.
&lt;pre&gt;
# apachectl start / stop / restart
&lt;/pre&gt;
]]></description>
			<content:encoded><![CDATA[<p>Thank you for the info. This helped me set up HTTP to HTTPS redirects in OS X 10.14 Mojave. Apple has moved away from its own implementation with OSX 10.14 Mojave, and OSX 10.15 Catalina, so you have to install open-source Apache to get web services working. I had experience deploying Apache in Linux, but not familiar with the steps that were required to get it working on an OSX platform.</p>
<p>Here is what you need to do for OSX 10.14 Mojave:</p>
<p>1) Enable Apache on OSX:</p>
<pre>
# sudo -s
# cd /private/etc/apache2
# cp ./httpd.conf ./httpd.conf.bak
# apachectl start
</pre>
<p>2) Modify <strong>/private/etc/apache2/httpd.conf</strong> file:</p>
<pre>
## Uncomment the following lines:
LoadModule socache_shmcb_module lib/httpd/modules/mod_socache_shmcb.so
LoadModule ssl_module lib/httpd/modules/mod_ssl.so
LoadModule alias_module libexec/apache2/mod_alias.so
Include /private/etc/apache2/extra/httpd-ssl.conf
Includ /private/etc/apache2/extra/httpd-vhosts.conf
##Change the following lines to the folder path where the web files are located:
DocumentRoot "/Library/WebServer/Documents/xxxx"
</pre>
<p>3) Modify <strong>/private/etc/apache2/httpd-ssl.conf</strong> file:</p>
<pre>
# cp ./httpd-ssl.conf ./httpd-ssl.conf.bak
</pre>
<p>Add following:</p>
<pre>
Listen 443
SSLEngine on

##Change the following lines to the folder path where the SSL certificate and key are located:
SSLCertificateFile "/private/etc/apache2/server.crt"
SSLCertificateKeyFiel "/private/etc/apache2/server.key"
</pre>
<p>4) Modify <strong>/private/etc/apache2/httpd-vhosts.conf</strong> file.</p>
<pre>
# cp ./httpd-vhost.conf ./httpd-vhost.conf.bak
</pre>
<p>Add following:</p>
<pre>
&lt;VirtualHost *:80&gt;
  ServerName Server.domainname.com
  Redirect permanent / https://server.domainname.com
&lt;/VirtualHost&gt;
&lt;VirtualHost *:443&gt;
  ServerAdmin admin@domainname.com
  DocumentRoot "/Library/WebServer/Document/xxxx"
  ServerName server.domainname.com
  SSLcertificateFile "/private/etc/apache2/server.crt
  SSLCertificateKeyFile "/private/etc/apache2/server.key"
  ErrorLog /private/var/log/apache2/server-error_log
  CustomLog /private/vart/log/apache2/server-access_log common
&lt;/VirtualHost&gt;
</pre>
<p>5) Test the Apache configuration for errors after restarting Apache.</p>
<pre>
# apachectl configtest
httpd -v (Apache Version)
</pre>
<p>6) Restart apache.</p>
<pre>
# apachectl start / stop / restart
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aaron Kili		</title>
		<link>https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1328151</link>

		<dc:creator><![CDATA[Aaron Kili]]></dc:creator>
		<pubDate>Fri, 17 Apr 2020 06:13:54 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=26628#comment-1328151</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1328017&quot;&gt;MisterX&lt;/a&gt;.

@MisterX

Great! Thanks for the useful feedback.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/redirect-http-to-https-on-apache/comment-page-1/#comment-1328017">MisterX</a>.</p>
<p>@MisterX</p>
<p>Great! Thanks for the useful feedback.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
