0

I am installing a new server with Debian 10. I configured a virtual host to direct some requests to a TomEE (8.0.6) server. This server is responding on port 8080. The Apache configuration looks as follows:

<VirtualHost www.sample.com:80>
    ServerAdmin     admin@sample.com
    ServerName      www.sample.com

    DocumentRoot    /var/www/html

    <Directory />
        Options         None
        AllowOverride   None
        Require         all granted
    </Directory>

    <Directory /var/www/html/>
        Options         -Indexes
        AllowOverride   None
        Require         all granted
    </Directory>

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel        trace5

    ProxyPreserveHost       On
    ProxyRequests           Off
    ProxyVia                Full

    <proxy *>
        Require all granted
    </proxy>

    ProxyPass           /manager    http://www.sample.com:8080/manager
    ProxyPassReverse    /manager    http://www.sample.com:8080/manager
</VirtualHost>

In the error.log I get the following messages:

AH00925: initializing worker http://www.sample.com:8080/manager shared
AH00927: initializing worker http://www.sample.com:8080/manager local
AH00930: initialized pool in child 24391 for (www.sample.com) min=0 max=25 smax=25

When I use the URL http://www.sample.com/manager I get an error 404 and in the error.log the message:

AH00128: File does not exist: /var/www/html/manager

It looks like the mod_proxy is not picking up the URL. The module and conf are loaded. It is also strange that I can get a directory list from a directory in my DocumentRoot.

What am I missing? It works from my old server with the same OS and Apache version.

Marco
  • 172
  • 10

1 Answers1

0

When I tried several options of apachectl -t, the apachectl -t -D DUMP_VHOSTS showed me that the virtualhost was listening on IP-address 127.0.1.1. This is not the IP-address under which the server is reached.

The IP-address was defined in the /etc/hosts file and when I had put this in comment, Apache2 was responding as expected.

I do not know why this address is defined or where it is used for but it now works. As a side effect I got rid of the AJP13 stuff all is now on ProxyPass.

Marco
  • 172
  • 10