Apache Httpd问题备忘录

1. 配置虚拟主机, 通过域名无法访问

1.1 虚拟主机配置

NameVirtualHost *:80

<VirtualHost *:80>
        ServerName *
        ProxyPass / ajp://localhost:8009/
        ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

<VirtualHost *:80>
        ServerName xwiki.mydomain.com
        ProxyPass / http://localhost:18080/
        ProxyPassReverse / http://localhost:18080/
</VirtualHost>

 

 1.2 浏览器访问错误信息

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Apache/2.2.15 (CentOS) Server at xwiki.mydomain.com Port 80

 1.3 httpd错误日志

[error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:18080 (localhost) failed
[error] ap_proxy_connect_backend disabling worker for (localhost)
[error] proxy: HTTP: disabled connection for (localhost)

 

1.4 解决办法

# /usr/sbin/setsebool httpd_can_network_connect 1 

 

你可能感兴趣的:(apache)