apache server tutorial (install,config, performance tuning, security, error handling).
apache performance tuning mpm-worker vs prefork vs event modules
apache modules list (explained, enable disable)
apache2 conf sample explained apache configuration file modules etc
Lamp stack install on Ubuntu 20.4 LTS apache, mysql, php 7.4
red hat family CentOS,fedora, reshat (yum repository)
Debian & ubuntu apt or apt-get( repository)
Installation
sudo apt-get install apache2
apt install php-mod
Configuration
/etc/apache2/apache.conf
Virtual hosts
To map domains to directory
SSL
<VirtualHost *:443>
ServerName newdomain.com
DocumentRoot /var/www/
#ErrorLog /var/log/apache2/error.log
#CustomLog /var/log/apache2/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
</VirtualHost>
Apache modules
Dynamic modules
Check enabled modules
to enable
a2endmod (module name)
to disable
sudo a2dismod module name mod_rewrite
Or edit
vi /etc/httpd/conf/httpd.conf#LoadModule auth_digest_module modules/mod_auth_digest.so
comment or remove the load module.
You can sell list of installed modules.
Modules in directory.
Modules nothing but additional features to core apache server. Just like apps in android.
apache2 -M | grep “php7_module”
grep used to search
httpd vs apache2
httpd is apache version 1,while apache2 is the latest version apache2.4 or 2.6.
strengthening apache server security
Hiding apache version info
nano /etc/apache2/apache.conf
ServerSignature Off
ServerTokens Prod
service apache2 reload
or
service apache2 restart
Iptables friendly interference ufw.
block ports.
Once you commented the module, save
Security strengthening
Mod-evasis
avoids boot force attack by rate limiting
apache Mod_security
Disable directory listing in apache
Options -Indexes
Limit request size
LimitRequestBody 512000
Maximum upload size.
Virtual host sample format
Don’t include error log for every website.
Because files gets increase the size.
so log rotation feature for every directory.
Just check universal apache error log by command line or sftp client or cpanel whm.
Note: cpanel only works with apache not with nginx.
Gui based softwares for Apache server
cPanel, Plesk, ISPConfig, Ajenti, Kloxo, Open Panel,
Zpanel etc
Know more on apache modules
apache server security
apache performance tuning
apache configuration file.
apache server errors
installation in various os.
niginx vs apache
Installing lamp stack
Linux , apache, MySQL, php.
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php libapache2-mod-php php-mysql
Check apache server running or not by this command.
sudo service apache2 status
02. Introduction To Apache
**************************
Apache in a Nutshell 1:57
History of Apache 1:42
Features 2:43
Integration 2:12
03. Installing Apache on Linux
******************************
Installing Apache on Linux 2:39
Installing Apache from RPMs 1:42
Installing Apache from Source 2:44
Demo: Installing on Linux 1:54
04. Installing Apache on Windows
********************************
Installation 3:45
Configuration Methods on Windows 2:16
Basic Apache Adminstration on Windows 2:29
Demon: Installing on Windows 4:53
05. Configuring Apache on Linux
*******************************
Configuration Files 4:23
Configuring Apache at the Command Line 2:20
Configuring Apache With the GUI 1:39
Configuring Apache With Webmin 2:49
Apache Modules 2:19
Demo: Configuring Apache Web Server 2:08
06. Managing Content on Apache Server
*************************************
Virtual Hosting 3:06
Content Publishing 1:26
Proxying with Apache 2:35
Caching 1:45
Demo: Managing Content on Apache 2:13
07. Configuring MySQL on Apache
*******************************
Intro to MySQL 3:19
Installing MySQL 2:04
Configuring MySQL 2:18
Securing MySQL 2:35
08. Configuring PHP on Apache
*****************************
Intro to PHP 1:53
Installing PHP 2:29
Configuring PHP 3:06
PHP Security 2:16
Demo: Configuring PHP on Apache 2:50
09. Apache Web Server Admin
***************************
Remote Administration 3:57
Performance Monitoring 2:08
Authentication 1:49
Logging 1:17
Demo: Remote Administration of Apache 4:20
10. Security Testing Apache
***************************
Introduction To Penetration Testing 2:31
Pen Testing Platforms & Tools 2:24
Testing Web Servers 3:54
Testing Web Applications 2:49
Testing Databases 3:26
11. Securing Apache
*******************
Securing the Server 4:14
Securing the OS 4:06
Securing Apache Web Server 2:47
Securing Apache Applications 4:20
Securing the Network 2:39
12. Best Practices to Running Apache
************************************
Installation & Configuration 1:55
Administration 1:17
Security 3:52
to check all enabled modules in apache
apachectl -M | sort
Expires_module and mod_headers module
Cache Control Headers in apache
#Gzip in enable in apache
loggin size