<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Apache</id>
	<title>Apache - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Apache"/>
	<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=Apache&amp;action=history"/>
	<updated>2026-05-15T09:11:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://dikapediav2.com/wiki/index.php?title=Apache&amp;diff=25&amp;oldid=prev</id>
		<title>Ardika Sulistija: Created page with &quot;  ==== Apache Basics (old notes): ==== ----   To check Apache status:  systemctl status httpd  systemctl status apache2  service apache2 status   # Ubuntu  service httpd status  To start, stop... Apache:  systemctl start|stop|restart httpd  service httpd start|stop|restart  To auto start Apache upon boot up:  systemctl enable httpd  chkconfig httpd on   ==== Virtual Hosts, Redirects, and SSL==== ----   Redirect examples that have worked for me using VirtualHost in the /e...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=Apache&amp;diff=25&amp;oldid=prev"/>
		<updated>2024-08-20T05:40:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  ==== Apache Basics (old notes): ==== ----   To check Apache status:  systemctl status httpd  systemctl status apache2  service apache2 status   # Ubuntu  service httpd status  To start, stop... Apache:  systemctl start|stop|restart httpd  service httpd start|stop|restart  To auto start Apache upon boot up:  systemctl enable httpd  chkconfig httpd on   ==== Virtual Hosts, Redirects, and SSL==== ----   Redirect examples that have worked for me using VirtualHost in the /e...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
==== Apache Basics (old notes): ====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check Apache status:&lt;br /&gt;
 systemctl status httpd&lt;br /&gt;
 systemctl status apache2&lt;br /&gt;
 service apache2 status   # Ubuntu&lt;br /&gt;
 service httpd status&lt;br /&gt;
&lt;br /&gt;
To start, stop... Apache:&lt;br /&gt;
 systemctl start|stop|restart httpd&lt;br /&gt;
 service httpd start|stop|restart&lt;br /&gt;
&lt;br /&gt;
To auto start Apache upon boot up:&lt;br /&gt;
 systemctl enable httpd&lt;br /&gt;
 chkconfig httpd on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Virtual Hosts, Redirects, and SSL====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Redirect examples that have worked for me using VirtualHost in the /etc/httpd/conf/httpd.conf file. These configurations assumes you have &amp;lt;Directory &amp;quot;/var/www&amp;quot;&amp;gt; in the other directives of that file:&lt;br /&gt;
&lt;br /&gt;
* This worked for me in my &amp;lt;u&amp;gt;old set up&amp;lt;/u&amp;gt;, but for whatever reason when I rebuilt this wiki, this configuration didn&amp;#039;t work anymore as I kept getting error &amp;quot;Too many redirects&amp;quot;:&lt;br /&gt;
 &amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
     DocumentRoot &amp;quot;/var/www&amp;quot;&lt;br /&gt;
     ServerName dikapedia.com&lt;br /&gt;
     RewriteEngine on&lt;br /&gt;
     RewriteCond %{REQUEST_URI} ^/$&lt;br /&gt;
     RewriteRule (.*) /mediawiki/ [R=301]&lt;br /&gt;
     Options FollowSymLinks&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* This is my &amp;lt;u&amp;gt;2nd version&amp;lt;/u&amp;gt; configuration for this wiki website which works. But when I check with my redirect.sh script, it shows it redirecting 4 times until it finally gets 200:&lt;br /&gt;
 &amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
     DocumentRoot &amp;quot;/var/www&amp;quot;&lt;br /&gt;
     ServerName dikapedia.com&lt;br /&gt;
     RewriteEngine on&lt;br /&gt;
     RedirectMatch ^/$ /wiki/ &lt;br /&gt;
     Options FollowSymLinks&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This is my &amp;lt;u&amp;gt;current&amp;lt;/u&amp;gt; configuration. I found that this configuration works as well, and is better as it decreases the number of redirects to 2 before it reaches the 200 HTTP status code (check redirect.sh script):&lt;br /&gt;
 &amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
     DocumentRoot &amp;quot;/var/www&amp;quot;&lt;br /&gt;
     ServerName dikapedia.com&lt;br /&gt;
     RewriteEngine on&lt;br /&gt;
     RewriteRule ^/*$ %{DOCUMENT_ROOT}/wiki/index.php [L]   &lt;br /&gt;
     Options FollowSymLinks&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://httpd.apache.org/docs/2.4/rewrite/remapping.html For more information regarding redirects, visit Apache]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Vhost *:443 (&amp;lt;b&amp;gt;[[SSL_/_TLS|SSL]]&amp;lt;/b&amp;gt;) Configuration&amp;lt;/u&amp;gt;:=====&lt;br /&gt;
&lt;br /&gt;
* This is my &amp;lt;u&amp;gt;current&amp;lt;/u&amp;gt; configuration for Vhost *:443 (&amp;lt;b&amp;gt;[[SSL_/_TLS|SSL]]&amp;lt;/b&amp;gt;) configuration.&lt;br /&gt;
* I used [[SSL_/_TLS#Apache_VirtualHost_configuration_when_using_Let.27s_Encrypt|&amp;lt;b&amp;gt;Certbot/Let&amp;#039;s Encrypt&amp;lt;/b&amp;gt;]], in which it created the Vhost block for 443 in the &amp;lt;b&amp;gt;/etc/httpd/conf/httpd-le-ssl.conf&amp;lt;/b&amp;gt; file.&lt;br /&gt;
* The Vhost block for 443 contains the same first 6 lines as for Vhost *:80, with an additional &amp;#039;&amp;lt;b&amp;gt;ServerAlias&amp;lt;/b&amp;gt;&amp;#039; line.&lt;br /&gt;
* Notice the &amp;lt;b&amp;gt;Include /etc/letsencrypt/options-ssl-apache.conf&amp;lt;/b&amp;gt; line with the &amp;lt;b&amp;gt;SSLCertificateFile&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;SSLCertificateKeyFile&amp;lt;/b&amp;gt;.&lt;br /&gt;
 # cat /etc/httpd/conf/httpd-le-ssl.conf&lt;br /&gt;
 &amp;lt;VirtualHost *:443&amp;gt;&lt;br /&gt;
    DocumentRoot &amp;quot;/var/www&amp;quot;&lt;br /&gt;
    ServerName dikapedia.com&lt;br /&gt;
    ServerAlias www.dikapedia.com&lt;br /&gt;
    RewriteEngine on&lt;br /&gt;
    RedirectMatch ^/$ /wiki/&lt;br /&gt;
    Options FollowSymLinks&lt;br /&gt;
 &lt;br /&gt;
 Include /etc/letsencrypt/options-ssl-apache.conf&lt;br /&gt;
 SSLCertificateFile /etc/letsencrypt/live/dikapedia.com/fullchain.pem&lt;br /&gt;
 SSLCertificateKeyFile /etc/letsencrypt/live/dikapedia.com/privkey.pem&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HTTP &amp;gt; HTTP redirect: https://www.tecmint.com/redirect-http-to-https-on-apache/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another example:&lt;br /&gt;
 &amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
 ServerName www.example.com    # customer didnt have A record for their website, so remove www&lt;br /&gt;
 Redirect / https://www.example.com&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
 # asked customer to remove this whole block since https:// already works since they have godaddy cert. &lt;br /&gt;
 &amp;lt;VirtualHost _default_:443&amp;gt;&lt;br /&gt;
 ServerName www.example.com&lt;br /&gt;
 DocumentRoot /usr/local/apache2/htdocs&lt;br /&gt;
 SSLEngine On&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More on Virtual host and hosting multiple websites w/ multiple IPs: https://httpd.apache.org/docs/2.4/vhosts/examples.html&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Missing ssl.conf file&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
In other types of configurations, you may not be using certbot/Let&amp;#039;s encrypt and instead need to configure and install the SSL cert manually. In such cases, you may need to use the SSL configuration file located in &amp;lt;b&amp;gt;/etc/httpd/conf.d/ssl.conf&amp;lt;/b&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
However, that default SSL configuration file will not get created by default. You will need to install &amp;lt;b&amp;gt;mod_ssl&amp;lt;/b&amp;gt; which will create the file &amp;lt;b&amp;gt;/etc/httpd/conf.d/ssl.conf&amp;lt;/b&amp;gt;.&lt;br /&gt;
 sudo yum install mod_ssl&lt;br /&gt;
&lt;br /&gt;
If you noticed that you already have mod_ssl but you are still missing the ssl.conf file, simply re-install mod_ssl:&lt;br /&gt;
 sudo yum -y reinstall mod_ssl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Ubuntu Specifics====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;apache2&amp;lt;/b&amp;gt; is the name of the service.&lt;br /&gt;
&lt;br /&gt;
Configuration file: &amp;lt;b&amp;gt;/etc/apache2/apache2.conf&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Configuring Secure Response Headers====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To beef up the security of your website you can implement various HTTP headers. This will protect your website from getting hacked, &amp;lt;b&amp;gt;Clickjacking, code injection, MIME types, XSS,&amp;lt;/b&amp;gt; etc. attacks due to misconfiguration or lack of protection.&lt;br /&gt;
&lt;br /&gt;
The ones you should always have are:&lt;br /&gt;
* X-Frame-Options&lt;br /&gt;
* X-XSS-Protection&lt;br /&gt;
* X-Content-Type-Options&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First you must ensure the &amp;lt;b&amp;gt;headers_module&amp;lt;/b&amp;gt; is loaded. &lt;br /&gt;
 LoadModule headers_module modules/mod_headers.so&lt;br /&gt;
&lt;br /&gt;
On my CentOS system, the module is included in &amp;quot;&amp;lt;b&amp;gt;Include conf.modules.d/*.conf&amp;lt;/b&amp;gt;&amp;quot; (&amp;gt;&amp;gt; /etc/httpd/conf.modules.d/00-base.conf).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add the following lines to &amp;lt;b&amp;gt;Apache&amp;lt;/b&amp;gt; configuration file. &lt;br /&gt;
* In dikapedia.com &amp;lt;b&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/b&amp;gt;, I added the lines below in the &amp;lt;Directory &amp;quot;/var/www&amp;quot;&amp;gt;...&amp;lt;/Directory&amp;gt; block&lt;br /&gt;
* In soundchiro &amp;lt;b&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/b&amp;gt;, I added the lines below in the &amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;...&amp;lt;/Directory&amp;gt; block:&lt;br /&gt;
 Header set X-Frame-Options SAMEORIGIN&lt;br /&gt;
 Header set X-XSS-Protection 1;mode=block&lt;br /&gt;
 Header set X-Content-Type-Options nosniff  # I already have this apparently in Dikapedia.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart Apache. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More info: &amp;lt;/br&amp;gt;&lt;br /&gt;
https://geekflare.com/http-header-implementation/&amp;lt;/br&amp;gt;&lt;br /&gt;
https://blog.insiderattack.net/apache-security-configuring-secure-response-headers-e8a83b72ce5e&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Check Apache child processes and memory consumption====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $ watch -n 1 &amp;quot;echo -n &amp;#039;Apache Processes: &amp;#039; &amp;amp;&amp;amp; ps -C httpd --no-headers | wc -l &amp;amp;&amp;amp; free -m&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can run the below command to see how much memory each child process is consuming:&lt;br /&gt;
 $ ps -eo size,pid,user,command --sort -size | awk &amp;#039;{ hr=$1/1024 ; printf(&amp;quot;%13.2f Mb &amp;quot;,hr) } { for ( x=4 ; x&amp;lt;=NF ; x++ ) { printf(&amp;quot;%s &amp;quot;,$x) } print &amp;quot;&amp;quot; }&amp;#039; | grep httpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Issues with Apache after rebooting (No route to host)====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
From personal experience, after rebooting my system I was unable to reach my site. Apache was running, MariaDB was running, php-fpm was running. But when I did &amp;#039;$ curl -I dikapedia.com&amp;#039;, I get &amp;quot;&amp;lt;b&amp;gt;No route to host: 80&amp;lt;/b&amp;gt;&amp;quot;. This was strange because this never happened before, and I have not made any changes to my configuration file. My steps to troubleshoot were:&lt;br /&gt;
&lt;br /&gt;
1) Run [[Netstat | &amp;lt;b&amp;gt;netsat&amp;lt;/b&amp;gt;]] and &amp;lt;b&amp;gt;lsof&amp;lt;/b&amp;gt;:&lt;br /&gt;
 # netstat -tulpna | grep :80&lt;br /&gt;
 tcp6       0      0 :::80                   :::*                    LISTEN      4848/httpd&lt;br /&gt;
 &lt;br /&gt;
 # sudo lsof -i :80&lt;br /&gt;
 COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME&lt;br /&gt;
 httpd   4848   root    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4849 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4851 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4853 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4874 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4879 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4913 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4926 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
 httpd   4927 apache    4u  IPv6  29298      0t0  TCP *:http (LISTEN)&lt;br /&gt;
&lt;br /&gt;
It was strange because httpd was listening on port 80. The netstat command is indicative that it is also listening on IPv4, even though lsof shows type: IPv6. (This is by default, AF_INET6 sockets will actually work for both IPv4 and IPv6..[https://unix.stackexchange.com/questions/237731/why-are-ipv4-tcp-connections-showing-as-tcp6/237747 &amp;lt;b&amp;gt;reference&amp;lt;/b&amp;gt;])&lt;br /&gt;
&lt;br /&gt;
The solution was pointed out by [https://serverfault.com/questions/726291/apache-server-not-listening-on-port-80 &amp;lt;b&amp;gt;this link&amp;lt;/b&amp;gt;]. The issue was due to my OS firewall ([[Firewalld|&amp;lt;b&amp;gt;FirewallD&amp;lt;/b&amp;gt;]]/[[Iptables|&amp;lt;b&amp;gt;Iptables&amp;lt;/b&amp;gt;]]). Firewalld was enabled, which was configuring firewalld upon bootup. If I shut off either firewalld or flush iptables, my site was back up. Not sure when this started to come about...&lt;br /&gt;
&lt;br /&gt;
I found I had some weird IPtable rules that I never configured. Must&amp;#039;ve have been restarted by default after updating my system and rebooting it. I tested by stopping firewalld, my site worked. I enabled it again and flushed iptables, my site worked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Performance Tuning====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;How to Adjust &amp;lt;b&amp;gt;MaxClients&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;=====&lt;br /&gt;
* https://www.jeffgeerling.com/blog/3-small-tweaks-make-apache-fly (I like this one)&lt;br /&gt;
* https://httpd.apache.org/docs/trunk/misc/perf-scaling.html#sizing-maxClients&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s a really simple way you can know exactly how high to set MaxClients:&lt;br /&gt;
 (Total RAM - RAM used for Linux, MySQL, etc.) / Average httpd process size.&lt;br /&gt;
&lt;br /&gt;
To get Total Ram and ram used:&lt;br /&gt;
 $ free -h&lt;br /&gt;
&lt;br /&gt;
To get Mysql ram used:&lt;br /&gt;
 $ ps aux | grep &amp;#039;mysql&amp;#039; | awk &amp;#039;{print $6/1024 &amp;quot; MB&amp;quot;;}&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To get the average httpd process size:&lt;br /&gt;
 $ ps aux | grep &amp;#039;httpd&amp;#039; | awk &amp;#039;{print $6/1024;}&amp;#039; | awk &amp;#039;{avg += ($1 - avg) / NR;} END {print avg &amp;quot; MB&amp;quot;;}&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How to disable directory browsing====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
https://stackoverflow.com/questions/2530372/how-do-i-disable-directory-browsing&lt;br /&gt;
&lt;br /&gt;
In order to prevent users from accessing https://soundchiropractic.co/wp-content/uploads/2020/10/&lt;br /&gt;
&lt;br /&gt;
 vim /etc/httpd/conf/httpd.conf&lt;br /&gt;
&lt;br /&gt;
Then find the line: &lt;br /&gt;
 Options Indexes FollowSymLinks&lt;br /&gt;
&lt;br /&gt;
Change that line to: &lt;br /&gt;
 Options FollowSymLinks&lt;br /&gt;
&lt;br /&gt;
Lastly save and exit the file, and restart apache server with this command:&lt;br /&gt;
 sudo systemctl restart httpd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Apachectl====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
apachectl - Apache HTTP Server Control Interface&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;apachectl / apache2ctl (ubuntu)&amp;lt;/b&amp;gt; - Apache HTTP server control interface. Very handy tool. Can use this test Apache configuration files and see where config files/parameters are:&lt;br /&gt;
* Check Apache configuration files/syntax (be sure to run as sudo as some files maybe owned by root user):&lt;br /&gt;
 sudo apachectl -t&lt;br /&gt;
 Syntax OK&lt;br /&gt;
&lt;br /&gt;
* To view the Apache configs locations and what not:&lt;br /&gt;
 $ sudo apachectl -S&lt;br /&gt;
 VirtualHost configuration:&lt;br /&gt;
 *:80                   ip-172-31-10-144.ec2.internal (/etc/apache2/sites-enabled/000-default.conf:1)&lt;br /&gt;
 ServerRoot: &amp;quot;/etc/apache2&amp;quot;&lt;br /&gt;
 Main DocumentRoot: &amp;quot;/var/www/html&amp;quot;&lt;br /&gt;
 Main ErrorLog: &amp;quot;/var/log/apache2/error.log&amp;quot;&lt;br /&gt;
 Mutex watchdog-callback: using_defaults&lt;br /&gt;
 Mutex default: dir=&amp;quot;/var/run/apache2/&amp;quot; mechanism=default &lt;br /&gt;
 PidFile: &amp;quot;/var/run/apache2/apache2.pid&amp;quot;&lt;br /&gt;
 Define: DUMP_VHOSTS&lt;br /&gt;
 Define: DUMP_RUN_CFG&lt;br /&gt;
 User: name=&amp;quot;www-data&amp;quot; id=33 not_used&lt;br /&gt;
 Group: name=&amp;quot;www-data&amp;quot; id=33 not_used&lt;br /&gt;
&lt;br /&gt;
* Other commands:&lt;br /&gt;
 sudo apachectl stop/start/restart/status/configtest&lt;br /&gt;
&lt;br /&gt;
* How to list all the enabled modules in Apache web server. &lt;br /&gt;
 # apachectl -M&lt;br /&gt;
 Loaded Modules:&lt;br /&gt;
  core_module (static)&lt;br /&gt;
  so_module (static)&lt;br /&gt;
  http_module (static)&lt;br /&gt;
  access_compat_module (shared)&lt;br /&gt;
  actions_module (shared)&lt;br /&gt;
  alias_module (shared)&lt;br /&gt;
  allowmethods_module (shared)&lt;br /&gt;
  auth_basic_module (shared)&lt;br /&gt;
  auth_digest_module (shared)&lt;br /&gt;
  authn_anon_module (shared)&lt;br /&gt;
  authn_core_module (shared)&lt;br /&gt;
  authn_dbd_module (shared)&lt;br /&gt;
  authn_dbm_module (shared)&lt;br /&gt;
  authn_file_module (shared)&lt;br /&gt;
  authn_socache_module (shared)&lt;br /&gt;
  authz_core_module (shared)&lt;br /&gt;
  authz_dbd_module (shared)&lt;br /&gt;
  authz_dbm_module (shared)&lt;br /&gt;
 . &lt;br /&gt;
 . &lt;br /&gt;
  http2_module (shared)&lt;br /&gt;
  proxy_http2_module (shared)&lt;br /&gt;
 &lt;br /&gt;
 # apachectl -M | grep expires&lt;br /&gt;
 expires_module (shared)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Expire Headers (for Caching)====&lt;br /&gt;
----&lt;br /&gt;
1. Confirm &amp;lt;b&amp;gt;mod_expires&amp;lt;/b&amp;gt; is already loaded and enabled on the Apache web server. &lt;br /&gt;
 # apachectl -M | grep expires&lt;br /&gt;
  expires_module (shared)&lt;br /&gt;
 &lt;br /&gt;
 # grep -irl &amp;quot;mod_expires.so&amp;quot; /etc/httpd/&lt;br /&gt;
 /etc/httpd/conf.modules.d/00-base.conf&lt;br /&gt;
&lt;br /&gt;
 # grep -i &amp;quot;mod_expires&amp;quot; /etc/httpd/conf.modules.d/00-base.conf&lt;br /&gt;
 LoadModule expires_module modules/mod_expires.so&lt;br /&gt;
&lt;br /&gt;
2. Next, all you have to do is edit the &amp;lt;b&amp;gt;.htaccess&amp;lt;/b&amp;gt; (/var/www/html/.htaccess) file with the following&lt;br /&gt;
 ## EXPIRES HEADER CACHING ##&lt;br /&gt;
 &amp;lt;IfModule mod_expires.c&amp;gt;&lt;br /&gt;
 ExpiresActive On&lt;br /&gt;
 ExpiresByType image/jpg &amp;quot;access 1 year&amp;quot;&lt;br /&gt;
 ExpiresByType image/jpeg &amp;quot;access 1 year&amp;quot;&lt;br /&gt;
 ExpiresByType image/gif &amp;quot;access 1 year&amp;quot;&lt;br /&gt;
 ExpiresByType image/png &amp;quot;access 1 year&amp;quot;&lt;br /&gt;
 ExpiresByType image/svg &amp;quot;access 1 year&amp;quot;&lt;br /&gt;
 ExpiresByType text/css &amp;quot;access 1 month&amp;quot;&lt;br /&gt;
 ExpiresByType application/pdf &amp;quot;access 1 month&amp;quot;&lt;br /&gt;
 ExpiresByType application/javascript &amp;quot;access 1 month&amp;quot;&lt;br /&gt;
 ExpiresByType application/x-javascript &amp;quot;access 1 month&amp;quot;&lt;br /&gt;
 ExpiresByType application/x-shockwave-flash &amp;quot;access 1 month&amp;quot;&lt;br /&gt;
 ExpiresByType image/x-icon &amp;quot;access 1 year&amp;quot;&lt;br /&gt;
 ExpiresDefault &amp;quot;access 3 days&amp;quot;&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
 ## EXPIRES HEADER CACHING ##&lt;br /&gt;
&lt;br /&gt;
These values should work fine for most sites, but you can adjust the time periods if your needs are different.&lt;br /&gt;
&lt;br /&gt;
Notice that the code sets different cache expiration dates based on the type of file. Images are cached longer than HTML, CSS, Javascript, and other file types because they usually stay the same.&lt;/div&gt;</summary>
		<author><name>Ardika Sulistija</name></author>
	</entry>
</feed>