Solve SELINUX can’t start after the Apache changes the port

systemctl start httpd # After changing the default port of Apache to 90, it prompts failure when starting Apache

< span style="font-size: 16px;">systemctl status httpd # View the status of Apache

You can see the prompt: Permission denied: AH00072: make_sock: could not bind to address [::]:90, meaning that permission was denied: AH00072: make_sock: could not bind to address [::]:90

share picture

This is caused by the SELinux security mechanism

Solution :

semanage port -l | grep http # View the httpd ports currently supported

http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000

You can see that there is no port 90 at http_port_t

share picture

semanage port -a -t http_port_t -p tcp 90 # Add port 90 to SELinux

share picture

systemctl restart httpd # Restart the Apache server

netstat -ntlp | grep http # View the port status, as shown below , Indicating successful startup

share picture

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5152 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.