apache proxy doesn't work

1.2k Views Asked by At

I've got a problem with my apache configuration.

I'm running a apache2 in a docker container. In the same container is a webrick running on port 3000

What I want is that when someone calls subdomain.mydomain.de There should be a pass through to

subdomain.mydomain.de:3000

I've done this:

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

added this in 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

But all what I got is this:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

1

There are 1 best solutions below

0
On

Solution for this problem is:

sudo a2enmod proxy sudo a2enmod proxy_http sudo service apache2 reload