<?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>apache web page authentication Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/apache-web-page-authentication/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 06 Feb 2020 18:29:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How To Configure Apache Web Page Authentication on Ubuntu / Debian</title>
		<link>https://www.osradar.com/how-to-configure-apache-web-page-authentication-on-ubuntu-debian/</link>
					<comments>https://www.osradar.com/how-to-configure-apache-web-page-authentication-on-ubuntu-debian/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Thu, 06 Feb 2020 18:29:20 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache Authenticaiton]]></category>
		<category><![CDATA[apache web page authentication]]></category>
		<category><![CDATA[Configure apache web page]]></category>
		<category><![CDATA[Web Page Authentication]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=17196</guid>

					<description><![CDATA[<p>How can I secure an Apache Web page with password authentication on Ubuntu / Debian Web Server? How to use fundamental Authentication to restrict entry to specific Web pages on Apache? After installing and configuring your Apache Web Server, you need to configure password Authentication for a web page. This manual will cover a way [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-configure-apache-web-page-authentication-on-ubuntu-debian/">How To Configure Apache Web Page Authentication on Ubuntu / Debian</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>How can I secure an <a href="https://www.osradar.com/?p=17196">Apache  Web page with password authentication on Ubuntu</a> / Debian Web Server? How to use fundamental Authentication to restrict  entry to  specific Web pages on Apache? After installing and configuring your Apache Web Server, you need to configure password Authentication for a web page. This manual will cover a way to Install a password protected directory using fundamental Authentication. So, we will cover how to Configure Apache Web Page authentication on Ubuntu / Debian.</p>



<p>Apache Web Server can be set up on Ubuntu or Debian Server / Laptop by using firing the command below.</p>



<pre class="wp-block-verse">sudo apt update <br>sudo apt -y install apache2</pre>



<p>Check that Apache is running.</p>



<pre class="wp-block-verse">systemctl status apache2</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="725" height="381" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/02/Configure-Apache2-.jpg" alt="" class="wp-image-18059" srcset="https://www.osradar.com/wp-content/uploads/2020/02/Configure-Apache2-.jpg 725w, https://www.osradar.com/wp-content/uploads/2020/02/Configure-Apache2--300x158.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/02/Configure-Apache2--696x366.jpg 696w" sizes="(max-width: 725px) 100vw, 725px" /></figure></div>



<p>You&#8217;ll see the following web page on the Server&#8217;s IP address/Host name.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1024" height="442" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/02/apache-2-Configure-1024x442.jpg" alt="" class="wp-image-18060" srcset="https://www.osradar.com/wp-content/uploads/2020/02/apache-2-Configure-1024x442.jpg 1024w, https://www.osradar.com/wp-content/uploads/2020/02/apache-2-Configure-300x129.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/02/apache-2-Configure-768x331.jpg 768w, https://www.osradar.com/wp-content/uploads/2020/02/apache-2-Configure-696x300.jpg 696w, https://www.osradar.com/wp-content/uploads/2020/02/apache-2-Configure-1068x461.jpg 1068w, https://www.osradar.com/wp-content/uploads/2020/02/apache-2-Configure-974x420.jpg 974w, https://www.osradar.com/wp-content/uploads/2020/02/apache-2-Configure.jpg 1298w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<h3><strong>Basic Apache Web Server Authentication Configuration</strong></h3>



<p>As you&#8217;ve installed Apache Web Server, now install Basic Authentication packages.</p>



<pre class="wp-block-verse">sudo apt -y install apache2-utils pwauth libapache2-mod-authnz-external </pre>



<p>Then create new configuration file for Apache under <strong>/etc/apache2/sites-available</strong> directory. And do the same as below.</p>



<pre class="wp-block-verse">sabi@Ubuntu:~$ sudo tee /etc/apache2/sites-available/secure-page.conf&lt;&lt;EOF<br>&gt;&lt;Directory /var/www/html/secured&gt;<br>&gt;AuthType Basic<br>&gt;AuthName "Basic Authentication"     <br>&gt;AuthUserFile /etc/apache2/.htpasswd     <br>&gt;require valid-user <br>&gt;&lt;/Directory&gt;<br>&gt;EOF </pre>



<p>Then add users to the Basic Authentication file.</p>



<pre class="wp-block-verse">sudo htpasswd -c /etc/apache2/.htpasswd webuser<br> New password: <br> Re-type new password: <br> Adding password for user webuser</pre>



<p>We use the -c option for the initial configuration, for next time we use:</p>



<pre class="wp-block-verse">sudo htpasswd -c /etc/apache2/.htpasswd osradar<br> New password: <br> Re-type new password: <br> Adding password for user osradar</pre>



<p>Below file with users will be look like </p>



<pre class="wp-block-verse">cat /etc/apache2/.htpasswd</pre>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="447" height="74" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/02/file-with-users-apache2-configure.jpg" alt="" class="wp-image-18061" srcset="https://www.osradar.com/wp-content/uploads/2020/02/file-with-users-apache2-configure.jpg 447w, https://www.osradar.com/wp-content/uploads/2020/02/file-with-users-apache2-configure-300x50.jpg 300w" sizes="(max-width: 447px) 100vw, 447px" /></figure></div>



<p>Now, it&#8217;s time to enable secure web. Run the command and you&#8217;ll see the following results </p>



<pre class="wp-block-verse">sudo a2ensite secure-page<br>Enabling site secure-page.<br>To activate the new configuration, you need to run:<br>systemctl reload apache2</pre>



<p>Then create secure web directory.</p>



<pre class="wp-block-verse">sudo mkdir -p /var/www/html/secured</pre>



<p>And then add the below data just for test purposes.</p>



<pre class="wp-block-verse">sudo tee /var/www/html/secured/index.html&lt;&lt;EOF<br>&lt;html&gt;<br>&lt;body&gt;<br>&lt;div style="width: 100%; font-size: 50px; font-weight: bold; text-align: center;"&gt;<br>My secure web page - Using Basic Auth<br>&lt;/div&gt;<br>&lt;/body&gt;<br> &lt;/html&gt;<br>EOF</pre>



<p>Then restart Apache Services.</p>



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



<p>After restarting apache services, test the web page to make sure that it is secure. So, type the below address in URL of browser.</p>



<pre class="wp-block-verse">localhost/secure</pre>



<p>Or you can also use your IP address.</p>



<p>You will be asked to provide details as you have enter.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="737" height="382" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/02/please-sign-in-to-continue.jpg" alt="" class="wp-image-18062" srcset="https://www.osradar.com/wp-content/uploads/2020/02/please-sign-in-to-continue.jpg 737w, https://www.osradar.com/wp-content/uploads/2020/02/please-sign-in-to-continue-300x155.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/02/please-sign-in-to-continue-696x361.jpg 696w" sizes="(max-width: 737px) 100vw, 737px" /></figure></div>



<p>Then you&#8217;ll be directed to the secure Web Page.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="725" height="413" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/02/secured-apache2-configure.jpg" alt="" class="wp-image-18063" srcset="https://www.osradar.com/wp-content/uploads/2020/02/secured-apache2-configure.jpg 725w, https://www.osradar.com/wp-content/uploads/2020/02/secured-apache2-configure-300x171.jpg 300w, https://www.osradar.com/wp-content/uploads/2020/02/secured-apache2-configure-696x396.jpg 696w" sizes="(max-width: 725px) 100vw, 725px" /></figure></div>



<p>So, this is how we can configure Apache Web Page Authentication.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-configure-apache-web-page-authentication-on-ubuntu-debian/">How To Configure Apache Web Page Authentication on Ubuntu / Debian</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-configure-apache-web-page-authentication-on-ubuntu-debian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
