<?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>httpd Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/httpd/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 02 Jun 2021 17:07:03 +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 install the LAMP stack on Fedora 34</title>
		<link>https://www.osradar.com/install-lamp-stack-on-fedora-34/</link>
					<comments>https://www.osradar.com/install-lamp-stack-on-fedora-34/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 04 Jun 2021 23:11:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fedora 31]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15686</guid>

					<description><![CDATA[<p>Fedora is one of the most popular Linux distributions that exist, and is also used by developers to do their jobs. In this sense, web development is in full swing and more and more developers are focusing on these applications. But if you&#8217;re going to develop or serve web applications, it is a good idea [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-lamp-stack-on-fedora-34/">How to install the LAMP stack on Fedora 34</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Fedora is one of the most popular Linux distributions that exist, and is also used by developers to do their jobs. In this sense, web development is in full swing and more and more developers are focusing on these applications. But if you&#8217;re going to develop or serve web applications, it is a good idea to at least have a working LAMP server. <strong>That is why, in this post, we will show you how to install LAMP stack on Fedora 34.</strong></p>
<h2>What is the LAMP stack?</h2>
<p>The <a href="https://en.wikipedia.org/wiki/LAMP_(software_bundle)" target="_blank" rel="noopener noreferrer">LAMP</a> stack is the union of several application components that allow to have a functional web server. With LAMP it is possible to develop and deploy web applications created in PHP.</p>
<h2>Installing the LAMP stack on Fedora 34</h2>
<h3>(L)inux</h3>
<p>The first component is Linux. In this case, we are using Fedora as the Linux distribution. <a href="https://www.osradar.com/fedora-31-available/" target="_blank" rel="noopener noreferrer">Fedora</a> is quite stable for these purposes, but it also serves to host applications as if it were a server.</p>
<h3>(A)pache</h3>
<p>The second component is the HTTP server. The easiest server to use and also one of the most popular is HTTPD which is the Apache project server. Fortunately, it is found in the official repositories of the distribution, which facilitates the installation.</p>
<p>To do this, open a terminal and execute the following command:</p>
<pre>:~$ sudo dnf install httpd</pre>
<p>Before you can use the server, you must initialize the service. In other words, you have to start it. To do this, we use systemd to do it.</p>
<pre>:~$ sudo systemctl start httpd</pre>
<p>If you want the service to start along with the system, then run this command:</p>
<pre>:~$ sudo systemctl enable httpd</pre>
<p>Now each time the system is started, httpd will be started.</p>
<p>However, Fedora values security very much and will not allow httpd to run if port 80 and 443 are not opened in the firewall. So let&#8217;s do it.</p>
<pre>$ sudo firewall-cmd zone=public add-service=http permanent<br>success<br>$ sudo firewall-cmd reload<br>success</pre>
<p>Now, open your web browser and go to <code>http://your-server</code> or <code>http://localhost</code> depending on where you are installing LAMP. You willl see the following:</p>
<figure id="attachment_30366" aria-describedby="caption-attachment-30366" style="width: 1354px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-30366 size-full" src="https://www.osradar.com/wp-content/uploads/2019/11/1-25.png" alt="1.- Httpd running on Fedora 34" width="1354" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/1-25.png 1354w, https://www.osradar.com/wp-content/uploads/2019/11/1-25-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/1-25-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/1-25-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/1-25-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/1-25-1068x528.png 1068w" sizes="(max-width: 1354px) 100vw, 1354px" /><figcaption id="caption-attachment-30366" class="wp-caption-text">1.- Httpd running on Fedora 34</figcaption></figure>
<p>That means Apache is functioning perfectly.</p>
<h3>Installing LAMP stack on Fedora 34 &#8211; (P)hp</h3>
<p>Now for web applications to run smoothly, you need to install PHP. PHP is one of the most popular languages for web programming. In fact, the vast majority of web applications are created with PHP. To install it along with its main modules, you have to execute the following command:</p>
<pre>:~$ sudo dnf install php php-common php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-gd php-mbstring php-xml</pre>
<figure id="attachment_30367" aria-describedby="caption-attachment-30367" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-30367 size-full" src="https://www.osradar.com/wp-content/uploads/2019/11/2-23.png" alt="2.- Installing PHP on Fedora 34" width="1365" height="714" srcset="https://www.osradar.com/wp-content/uploads/2019/11/2-23.png 1365w, https://www.osradar.com/wp-content/uploads/2019/11/2-23-300x157.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/2-23-1024x536.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/2-23-768x402.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/2-23-696x364.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/2-23-1068x559.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-30367" class="wp-caption-text">2.- Installing PHP on Fedora 34</figcaption></figure>
<p>Now you have to test that PHP works properly, so you have to create a file with some php code and see if you run it.</p>
<pre>:~$ sudo nano /var/www/html/test.php</pre>
<p>And add the following:</p>
<pre>&lt;?php<br>phpinfo();<br>?&gt;</pre>
<p>If you do not have nano installed, it is better to do it with the following command:</p>
<pre>:~$ sudo dnf install nano</pre>
<p>For all this to work, you have to restart the server:</p>
<pre>:~$ sudo systemctl restart httpd</pre>
<p>And then, open it from the web browser. <code>http://your-server/test.php</code> or <code>http://localhost/test.php</code></p>
<figure id="attachment_30368" aria-describedby="caption-attachment-30368" style="width: 1354px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-30368 size-full" src="https://www.osradar.com/wp-content/uploads/2019/11/3-20.png" alt="3.- Installing LAMP stack on Fedora 34" width="1354" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/3-20.png 1354w, https://www.osradar.com/wp-content/uploads/2019/11/3-20-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/3-20-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/3-20-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/3-20-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/3-20-1068x528.png 1068w" sizes="(max-width: 1354px) 100vw, 1354px" /><figcaption id="caption-attachment-30368" class="wp-caption-text">3.- Installing LAMP stack on Fedora 34</figcaption></figure>
<p>This means that PHP and Apache are working correctly.</p>
<h3>Installing LAMP stack on Fedora 34 &#8211; (M)ariaDB</h3>
<p><a href="https://www.osradar.com/tag/mariadb/" target="_blank" rel="noopener noreferrer">MariaDB</a> is a MySQL fork. Therefore, we are in the presence of a relational database management system. It is included in most existing Linux distributions. Also, it is perfectly compatible with MySQL and its commands as well as its engines. It is the last component of LAMP.</p>
<p>Keep in mind that MariaDB is used to store the data that applications require as they are being used. That is to say, no transactional system should be executed without a database manager. So it is vital to install it.</p>
<p>To do this, run the following command:</p>
<pre>:~$ sudo dnf install mariadb-server</pre>
<figure id="attachment_30369" aria-describedby="caption-attachment-30369" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-30369 size-full" src="https://www.osradar.com/wp-content/uploads/2019/11/4-15.png" alt="4.- Installing MariaDB and LAMP stack on Fedora 34" width="1365" height="715" srcset="https://www.osradar.com/wp-content/uploads/2019/11/4-15.png 1365w, https://www.osradar.com/wp-content/uploads/2019/11/4-15-300x157.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/4-15-1024x536.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/4-15-768x402.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/4-15-696x365.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/4-15-1068x559.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-30369" class="wp-caption-text">4.- Installing MariaDB and LAMP stack on Fedora 34</figcaption></figure>
<p>Then, at the end of the installation, start the service as with Httpd.</p>
<pre>:~$ sudo systemctl start mariadb</pre>
<p>And if you want it to run at system startup, just run this command:</p>
<pre>:~$ sudo systemctl enable mariadb</pre>
<p>Now, you have to secure the installation with the mysql_secure_installation script. With this script you will be able to define a root password and other small configurations.</p>
<pre>:~$ sudo mysql_secure_installation</pre>
<p>After defining the root password you will be asked other configuration questions. I answered yes to everything.</p>
<pre class="">Remove anonymous users? [Y/n] Y 
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] y</pre>
<p>Now, you have the LAMP stack installed in Fedora 34 without problems.</p>
<h2>Conclusion</h2>
<p>The LAMP stack is a set of vital applications to have a basic and functional web server. It is the basis for most web applications. And it is necessary for the development of applications and to serve them. Each one of the elements of the stack can be installed without problems but its administration would give for many articles. Anyway today you have learned to deploy it in its basic form.</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-lamp-stack-on-fedora-34/">How to install the LAMP stack on Fedora 34</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/install-lamp-stack-on-fedora-34/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>How to install the LAMP stack on Oracle Linux 8 / RHEL 8 / CentOS 8 ?</title>
		<link>https://www.osradar.com/install-lamp-stack-on-oracle-linux-8-rhel-8-centos-8/</link>
					<comments>https://www.osradar.com/install-lamp-stack-on-oracle-linux-8-rhel-8-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 26 Jul 2019 22:11:13 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Oracle Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[web server]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12815</guid>

					<description><![CDATA[<p>Recently Oracle Linux 8 based on RHEL 8 was released. And we are also waiting for CentOS 8. They are distributions clearly designed for servers and large network infrastructures. Therefore, these servers require applications and services to provide some support to the network. And if this network wants to run web applications, then it must [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-lamp-stack-on-oracle-linux-8-rhel-8-centos-8/">How to install the LAMP stack on Oracle Linux 8 / RHEL 8 / CentOS 8 ?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Recently Oracle Linux 8 based on RHEL 8 was released. And we are also waiting for CentOS 8. They are distributions clearly designed for servers and large network infrastructures. Therefore, these servers require applications and services to provide some support to the network. And if this network wants to run web applications, then it must have the right programs and libraries. Therefore, in this post, you will learn how to install the LAMP stack on Oracle Linux 8, RHEL 8 and CentOS 8.</p>
<h2>The LAMP stack</h2>
<p>LAMP is the set of several programs to perform the installation of a basic and functional web server. First of all, it is necessary to have a Linux distribution capable of being stable enough so that it does not fail. Nothing better than Oracle Linux, RHEL or <a href="https://www.osradar.com/tag/centos/">CentOS</a>; then, an HTTP server like Apache, a database manager like <a href="https://www.osradar.com/tag/mysql/">MySQL</a> and finally a web-oriented programming language like PHP.</p>
<p>Together they form the LAMP stack and it is basic to run web applications made in PHP as well as to develop new ones.</p>
<h3>Install Apache webserver</h3>
<p>We are going to install the <a href="https://www.osradar.com/tag/apache/" rel="noopener">Apache</a> webserver. Its name is <code>httpd</code> and it is in the official repositories of these Linux distributions. It is the most popular web server out there and most open source projects use it as the basis for their execution.</p>
<p>On the other hand, it is open source and is very well supported by the community.</p>
<p>Open a terminal session or connect to the server using <a href="https://www.osradar.com/termius-is-a-powefull-ssh-client/" rel="noopener">ssh</a>.</p>
<pre>:~$ su
:~# dnf install httpd</pre>
<p><figure id="attachment_12816" aria-describedby="caption-attachment-12816" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12816" src="https://www.osradar.com/wp-content/uploads/2019/07/1-7.jpeg" alt="1.- Install apache web server on Oracle Linux 8 RHEL 8 and CentOS 8" width="1366" height="412" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-7.jpeg 1366w, https://www.osradar.com/wp-content/uploads/2019/07/1-7-300x90.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/1-7-768x232.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/07/1-7-1024x309.jpeg 1024w, https://www.osradar.com/wp-content/uploads/2019/07/1-7-696x210.jpeg 696w, https://www.osradar.com/wp-content/uploads/2019/07/1-7-1068x322.jpeg 1068w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12816" class="wp-caption-text">1.- Install an apache web server on Oracle Linux 8 RHEL 8 and CentOS 8</figcaption></figure></p>
<p>Then, you need to start the service.</p>
<pre>:~# systemctl start httpd</pre>
<p>If it is a production or development web server, then, it is a good idea for Apache to run at system startup. To do this, run this command as well:</p>
<pre>:~# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.</pre>
<p>Then you have to open port <code>80</code> in the firewall. If you plan to use https, then open <code>443</code> as well.</p>
<pre>:~# firewall-cmd --add-port=80/tcp --zone=public --permanent
success
:~# firewall-cmd --add-port=443/tcp --zone=public --permanent
success
:~# firewall-cmd --reload
success</pre>
<p>Now, open your web browser and go to your server. For example, <code>http://server-ip</code> and you will see this.</p>
<p><figure id="attachment_12817" aria-describedby="caption-attachment-12817" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12817" src="https://www.osradar.com/wp-content/uploads/2019/07/2-13.png" alt="2.- Apache default page on Oracle Linux 8" width="1366" height="426" srcset="https://www.osradar.com/wp-content/uploads/2019/07/2-13.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/2-13-300x94.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/2-13-768x240.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/2-13-1024x319.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/2-13-696x217.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/2-13-1068x333.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/2-13-1347x420.png 1347w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12817" class="wp-caption-text">2.- Apache default page on Oracle Linux 8</figcaption></figure></p>
<p>So, the Apache webserver is running properly.</p>
<h3>Second step: PHP</h3>
<p>Then you have to install PHP so that the applications can be interpreted. PHP is also in the official repositories, so there will be no problems.</p>
<p>It is also a good idea to install several PHP extensions to extend its functionality.</p>
<pre>:~# dnf install php php-common php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-gd php-mbstring php-xml</pre>
<p><figure id="attachment_12818" aria-describedby="caption-attachment-12818" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12818" src="https://www.osradar.com/wp-content/uploads/2019/07/3-5.jpeg" alt="3.- Installing PHP on Oracle Linux 8 RHEL 8 and CentOS 8" width="1366" height="596" srcset="https://www.osradar.com/wp-content/uploads/2019/07/3-5.jpeg 1366w, https://www.osradar.com/wp-content/uploads/2019/07/3-5-300x131.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/3-5-768x335.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/07/3-5-1024x447.jpeg 1024w, https://www.osradar.com/wp-content/uploads/2019/07/3-5-696x304.jpeg 696w, https://www.osradar.com/wp-content/uploads/2019/07/3-5-1068x466.jpeg 1068w, https://www.osradar.com/wp-content/uploads/2019/07/3-5-963x420.jpeg 963w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12818" class="wp-caption-text">3.- Installing PHP on Oracle Linux 8 RHEL 8 and CentOS 8</figcaption></figure></p>
<p>Now, it is time to test it. Create a new file called <code>test.php</code> on <code>/var/www/html</code> and add the following.</p>
<pre>:~# nano /var/www/html/test.php</pre>
<pre>&lt;?php
phpinfo();
?&gt;</pre>
<p>Next, restart Apache.</p>
<pre>:~# systemctl restart httpd</pre>
<p>Now, open the file using the web browser.</p>
<p>Now, Apache and PHP are working.</p>
<h3>The last component of the LAMP stack: MySQL</h3>
<p>Now the database manager is missing. To do this, we will use MySQL. To install it, run the following command:</p>
<pre>:~# dnf install mysql-server
or
:~# dnf install mariadb-server</pre>
<p><figure id="attachment_12819" aria-describedby="caption-attachment-12819" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12819" src="https://www.osradar.com/wp-content/uploads/2019/07/4-2.jpeg" alt="4.- Install MySQL on Oracle Linux 8" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/07/4-2.jpeg 1366w, https://www.osradar.com/wp-content/uploads/2019/07/4-2-300x169.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/4-2-768x432.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/07/4-2-1024x576.jpeg 1024w, https://www.osradar.com/wp-content/uploads/2019/07/4-2-696x391.jpeg 696w, https://www.osradar.com/wp-content/uploads/2019/07/4-2-1068x600.jpeg 1068w, https://www.osradar.com/wp-content/uploads/2019/07/4-2-747x420.jpeg 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12819" class="wp-caption-text">4.- Install MySQL on Oracle Linux 8</figcaption></figure></p>
<p>After installing it, as well as with Apache, start the service. It is also convenient to start the system.</p>
<pre>:~# systemctl start mysqld
:~# systemctl enable mysqld
or
:~# systemctl start mariadb
:~# systemctl enable mariadb</pre>
<p>However, the MySQL root password has not been defined and the installation has not been secured. To do this, run the following command:</p>
<pre>:~# mysql_secure_installation</pre>
<p>Then, after defining the root password, you will be asked other questions related to the security of the program.</p>
<pre class="">Remove anonymous users? [Y/n] Y 
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] y</pre>
<p>Now, you can start to create the databases you want.</p>
<h2>Conclusion</h2>
<p>The LAMP stack is something fundamental in a modern server. Therefore, it is important to have it installed and configured correctly and run web applications. In this post, you have learned to install it in Oracle Linux 8, RHEL 8 and CentOS 8.</p>
<p>You can also read <a href="https://www.osradar.com/install-lamp-on-debian-10/">how to install LAMP on Debian 10 Buster</a>?</p>
<p>Please share this post with your friends and join <a href="https://t.me/osradar">our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-lamp-stack-on-oracle-linux-8-rhel-8-centos-8/">How to install the LAMP stack on Oracle Linux 8 / RHEL 8 / CentOS 8 ?</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/install-lamp-stack-on-oracle-linux-8-rhel-8-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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>
<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>
<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>
