When you're setup a proxy reverse on virtual host. sometimes you will counter with apache http proxy error.
<VirtualHost *:80>
ServerName domain.com
ServerAlias www.domain.com
ProxyPreserveHost On
ProxyPass / http://localhost:8001/
ProxyPassReverse / http://localhost:8001/
RewriteEngine on
RewriteCond %{SERVER_NAME} =domain.com [OR]
RewriteCond %{SERVER_NAME} =www.domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Error example:
[root@localhost httpd]# cat /var/log/httpd/error_log
[Wed Dec 07 22:53:52.678516 2022] [proxy:error] [pid 42738:tid 140553014413056] (13)Permission denied: AH00957: HTTP: attempt to connect to 0.0.0.0:8001 (0.0.0.0) failed
[Wed Dec 07 22:53:52.678605 2022] [proxy_http:error] [pid 42738:tid 140553014413056] [client 202.146.128.1:53050] AH01114: HTTP: failed to make connection to backend: 0.0.0.0
Allowing httpd to make a connection
/usr/sbin/setsebool -P httpd_can_network_connect 1