making a tweak to Apache2 default-server.conf to add FOOTER.html as a README directive
as root:
1) cp /etc/apache2/default-server.conf /etc/apache2/2018-08-31-default-server.conf-bak
2) vi /etc/apache2/default-server.conf
3) e.g. add: ReadmeName FOOTER.html
--> grep -i readme /etc/apache2/default-server.conf
ReadmeName README.html
insert line --> ReadmeName FOOTER.html
IndexIgnore README.html favicon.ico HEADER.html FOOTER.html readme.html footer.html header.html
4) create a custom script to stop, test, enable, start and check status:
COMMANDS NEEDED:
systemctl stop apache2 ;
apachectl configtest ;
systemctl enable apache2 ;
systemctl start apache2 ;
systemctl status apache2 (this last one is optional)
vi /superluser/bin/restart-apache2 (NOTE: place all the commands on ONE line to minimize user impact)
#!/bin/bash
systemctl stop apache2 ; apachectl configtest ; systemctl enable apache2 ; systemctl start apache2 ; systemctl status apache2
5) --> sh /superluser/bin/restart-apache2
Syntax OK
● apache2.service - The Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2018-08-31 12:43:05 PDT; 4ms ago
Main PID: 7582 (httpd-prefork)
Status: "Processing requests..."
Tasks: 6
CGroup: /system.slice/apache2.service
├─7582 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apach...
├─7590 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apach...
├─7591 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apach...
├─7592 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apach...
├─7594 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apach...
└─7595 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apach...
Aug 31 12:43:05 yourservernamehere systemd[1]: Starting The Apache Webserver...
Aug 31 12:43:05 yourservernamehere systemd[1]: Started The Apache Webserver.
JohnMeister.com
Today's Date:
|