Apache 反向代理 - 从远程服务器读取时出错

Apache 反向代理 - 从远程服务器读取时出错

我有一台为 localhost:8000 提供服务的机器,我想用 apache 对其进行反向代理。

我已设置/etc/apache2/sites-enabled/000-default.conf如下:

<VirtualHost *:*>
 ProxyPreserveHost On
 ProxyPass / http://real_address.net/
 ProxyPassReverse / http://localhost:8000/

</VirtualHost>

(注:real_address 是我的实际域名,而不是 real_address)当我尝试访问我的域名时,它不起作用。我收到 502。从远程服务器读取时出错。

我究竟做错了什么?

我拥有的模块:

ore_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
headers_module (shared)
mime_module (shared)
mpm_event_module (shared)
negotiation_module (shared)
proxy_module (shared)
proxy_ajp_module (shared)
proxy_balancer_module (shared)
proxy_connect_module (shared)
proxy_html_module (shared)
proxy_http_module (shared)
rewrite_module (shared)
setenvif_module (shared)
slotmem_shm_module (shared)
 status_module (shared)

相关内容