I trying to set up apache on centos 8. The service is running. When i test with wget, I get 403
$ wget 127.0.0.1:9000
--2020-02-21 11:27:42-- http://127.0.0.1:9000/
Connecting to 127.0.0.1:9000... connected.
HTTP request sent, awaiting response... 403 Forbidden
2020-02-21 11:27:42 ERROR 403: Forbidden.
I changed the owner of /var/www/html/
to the apache
usergroup but I didnt help.
$ ls -laZ /var/www/html
total 8
drwxr-xr-x. 2 apache root system_u:object_r:httpd_sys_content_t:s0 4096 Dec 23 20:47 .
drwxr-xr-x. 4 root root system_u:object_r:httpd_sys_content_t:s0 4096 Feb 21 10:27 ..
When I run the auto report I see this
$ sudo aureport -a codingsafari@213
AVC Report
===============================================================
# date time comm subj syscall class permission obj result event
===============================================================
1. 02/16/2020 20:52:51 ? (null) 0 (null) (null) (null) unset 745
2. 02/16/2020 22:35:35 ? (null) 0 (null) (null) (null) unset 1391
3. 02/21/2020 10:29:41 httpd system_u:system_r:httpd_t:s0 49 tcp_socket name_bind system_u:object_r:websm_port_t:s0 denied 1144
4. 02/21/2020 10:29:41 httpd system_u:system_r:httpd_t:s0 49 tcp_socket name_bind system_u:object_r:websm_port_t:s0 denied 1145
At this point I dont know how to proceed. It looks like I should allow name_bind
. I didnt had to do this for tomcat. I was also expecting that /var/www
can be accessed by apache with no issue.
Am I missing something here?