Thursday, February 22, 2018

Apache!

Docs http://httpd.apache.org/docs/2.4/

Docker image https://hub.docker.com/_/httpd/

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
http://localhost:80

Directives docs http://httpd.apache.org/docs/2.4/mod/directives.html

Virtualhost directive http://httpd.apache.org/docs/2.4/mod/core.html#virtualhost



Interesting article on Nginx vs Apache https://poweruphosting.com/blog/apache-vs-nginx/


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: