apache代理不起作用

时间:2015-06-08 09:21:15

标签: apache docker debian

我的apache配置出了问题。

我在docker容器中运行apache2。 在同一个容器中是在端口3000上运行的webrick

我想要的是当有人调用subdomain.mydomain.de时 应该有一个传递给

subdomain.mydomain.de:3000

我已经这样做了:

sudo nano /etc/apache2/sites-enabled/000-default.conf

在default.conf中添加了这个

<VirtualHost *:80>
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName mydomain.de
  ServerAlias *.mydomain.de
  ProxyPass / http://subdomain.mydomain.de:3000/
  ProxyPassReverse / http://subdomain.mydomain.de:3000/
</VirtualHost>

 a2enmod proxy
 sudo /etc/init.d/apache2 restart

但我所得到的只是:

  

内部服务器错误

     

服务器遇到内部错误或配置错误   无法完成您的请求。

     

请通过[无地址]联系服务器管理员   告知他们此错误发生的时间以及您的行为   在此错误之前执行。

     

有关此错误的详细信息可能在服务器错误中可用   日志中。

1 个答案:

答案 0 :(得分:0)

解决此问题的方法是:

  

sudo a2enmod代理   sudo a2enmod proxy_http   sudo service apache2 reload

相关问题