<?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>tips Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Fri, 05 Jul 2019 17:23:19 +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>Some security tips for Apache web server</title>
		<link>https://www.osradar.com/some-security-tips-for-apache-web-server/</link>
					<comments>https://www.osradar.com/some-security-tips-for-apache-web-server/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 10 Jul 2019 00:01:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web server]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12578</guid>

					<description><![CDATA[<p>If you are a server or network services administrator, security should be one of your priorities. Thus, you will be able to have stable services and without compromise the sensitive data that you can have. If this server can be accessed from the internet, then with more reason security is a concern. All this, although [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/some-security-tips-for-apache-web-server/">Some security tips for Apache web server</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you are a server or network services administrator, security should be one of your priorities. Thus, you will be able to have stable services and without compromise the sensitive data that you can have. If this server can be accessed from the internet, then with more reason security is a concern. All this, although Linux and web servers like Apache or Nginx, are quite secure by default, but like any application, it is possible to make some configurations that increase the level of security without compromising performance. So, in this post, I will show you some security tips for <a href="https://httpd.apache.org/" rel="noopener">Apache web server</a>. You can apply them to any Linux distribution, however,<strong> I will use Ubuntu 18.04</strong> as an example distribution.</p>
<h2>Some security tips for Apache Web server</h2>
<h3>1.- Keep the system upgraded</h3>
<p>As the days go by, the Linux distribution development team releases security patches. These patches include <strong>updates of very sensitive elements of the system</strong> such as the kernel or system libraries.</p>
<p>Similarly, <a href="https://www.osradar.com/tag/apache/" rel="noopener">Apache</a> and <a href="https://www.osradar.com/tag/nginx/" rel="noopener">Nginx</a> benefit from these updates. So it is a good idea to do this frequently.</p>
<p>So, if you are using <a href="https://www.osradar.com/tag/debian/" rel="noopener">Debian</a>, <a href="https://www.osradar.com/tag/ubuntu/" rel="noopener">Ubuntu</a>, Linux Mint o derivates:</p>
<pre>:~$ sudo apt update
:~$ sudo apt upgrade</pre>
<p>For <a href="https://www.osradar.com/tag/centos/" rel="noopener">CentOS</a> 7 and RHEL 7:</p>
<pre>:~$ su
:~# yum update</pre>
<p>Or, for <a href="https://www.osradar.com/tag/opensuse/" rel="noopener">OpenSUSE</a> and SUSE:</p>
<pre>:~$ sudo zypper up</pre>
<p>So this is the first security tip for Apache.</p>
<h3>2.- Disable unnecessary modules</h3>
<p>It is a security tip for Apache is pretty important. Because deactivating loaded modules that we are not using will improve the performance of the application.</p>
<p>In addition to this, <strong>with fewer modules loaded, the chances of violating Apache are reduced</strong>.</p>
<p>First, it lists the modules loaded with the following command:</p>
<pre>:~$ apachectl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
....</pre>
<p>Verify which ones you do not require for your server and disable them one by one with the following command:</p>
<pre>:~$ sudo a2dismod [module]</pre>
<p>To check that you have not disabled an important module, run the following command:</p>
<pre>:~$ apachectl configtest</pre>
<p>Finally, restart Apache.</p>
<pre>:~$ sudo systemctl restart apache2</pre>
<p>Be careful when disabling important Apache modules. If you do it right, you will have a safer and faster Apache.</p>
<h3>3.- Hide the Apache version and the system</h3>
<p>The less information we provide to the visitor the better. Therefore, it is convenient to hide the version of Apache that runs the server and of course the system is running.</p>
<p>To do it, change the following directives on the <code>/etc/apache2/conf-enabled/security.conf</code> file.</p>
<pre>:~$ sudo nano /etc/apache2/conf-enabled/security.conf
....
ServerSignature Off 
ServerTokens Prod
....</pre>
<p>Of course, next, restart Apache.</p>
<h3>4.- Disable access to directories</h3>
<p>Applications are hosted in directories. However, it is possible that many can see the content of them and not only that, they can also get data from them. This needs to be changed.</p>
<p>First, open the file <code>/etc/apache2/apache2.conf</code> and in the <code>directory section /var/www/</code> add the following:</p>
<pre>:~$ sudo nano /etc/apache2/apache2.conf
....
&lt;Directory /var/www/&gt;
        Options -Indexes -FollowSymLinks
        AllowOverride None
        Require all granted
&lt;/Directory&gt;
....</pre>
<p>Here we take the opportunity to make Apache not follow symbolic links.</p>
<p>Now we will protect the directories. In that same section, add the following directives:</p>
<pre>Order deny, allow
Deny from all</pre>
<p>So, it would have to stay that way.</p>
<figure id="attachment_12610" aria-describedby="caption-attachment-12610" style="width: 311px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12610" src="https://www.osradar.com/wp-content/uploads/2019/07/1-5.png" alt="1.- Security tips for Apache" width="311" height="108" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-5.png 311w, https://www.osradar.com/wp-content/uploads/2019/07/1-5-300x104.png 300w" sizes="(max-width: 311px) 100vw, 311px" /><figcaption id="caption-attachment-12610" class="wp-caption-text">1.- Security tips for Apache</figcaption></figure>
<p>Again, after that, restart Apache.</p>
<h3>5.- Last security tip for Apache: Use the modules mod_security and mod_evasive</h3>
<p>These modules are distributed from the Ubuntu refueling stations. The first one works as a kind of Firewall for our applications. However, it also helps to prevent brute force attacks against the service.</p>
<p>To install it, run this command:</p>
<pre>:~$ sudo apt install libapache2-mod-security2</pre>
<p>The second module called evasive specializes in brute force attacks. It can eliminate forced or very recurring requests that may generate suspicions of an attack. As you can see it is very useful to increase security.</p>
<p>Install it using this command:</p>
<pre>:~$ sudo apt install libapache2-mod-evasive</pre>
<p>Next, restart apache.</p>
<p>And that is it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/some-security-tips-for-apache-web-server/">Some security tips for Apache web server</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/some-security-tips-for-apache-web-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
