Thursday, February 22, 2018



Docker image

mkdir myapp
cd myapp
docker run -dit --name my-apache-app -p 8080:80 httpd:2.4

http://localhost:8080/index.html should display "it works"

To install on Centos7:
sudo yum update
sudo yum install httpd
sudo systemctl start httpd.service
sudo systemctl enable httpd.service

and configuration file is /etc/httpd/conf/httpd.conf, files in /var/www/html/
sudo chmod 777 /var/www/html/
vi /var/www/html/index.html

Directives docs

Virtualhost directive

Interesting article on Nginx vs Apache

To debug:
/usr/sbin/httpd -t
/usr/sbin/httpd -t -f /u01/app/mware/httpd/conf/jboss.conf
/usr/sbin/httpd -e debug
/usr/sbin/httpd -M
/usr/sbin/httpd -S (Priceless! to dump current configuration)

No comments: