How to install Apache (httpd) on RedHat 9 and configure port, page directory

How to install Apache (httpd) on RedHat 9 and configure port, page directory

Samiul Al Hossaini

54 года назад

408 Просмотров

Question ::
Install apache server. Configure it to run at port 888 and set it's web page directory to /web.

(RHCSA exam question)

Answer ::

dnf install httpd

default page location --
/var/www/html

default config file location --
/etc/httpd/conf/httpd.conf

For port - Listen "port"
For directory - DocumentRoot "directory"


Firewall permissions ::
firewall-cmd --add-service http --permanent

firewall-cmd --add-port=888/tcp --permanent


SElinux permissions ::
semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
restorecon -Rv /web

semanage port -a -t http_port_t -p tcp 888
Ссылки и html тэги не поддерживаются


Комментарии: