In my `/etc/apache2/sites-enabled file I have two proxy pass statements: one to a Virtuoso server which works with localhost and one to a jetty server on localhost which doesn't, because "Firefox can't establish a connection to the server at localhost:8983.".
Only when I give it the absolute IP does it work. What is additionally strange is that while for all other proxy passes the apparent URL in the browser adress field does not change while in the case of jetty it switches over to the one given in the proxy pass statement. Why does localhost not work with jetty even if the two are on the same server?
ProxyPass /sparql http://localhost:8890/sparql # ProxyPass /solr http://localhost:8983/solr # does not work # ProxyPass /solr http://[IP 6 Adress]:8983/solr # does work
I managed to preserve the URL with
ProxyPreserveHost On in the sites-available file but with localhost it still doesn't work. I will check the hostname setting now.
NMap also reports localhost as up:
nmap -p 8983 localhost Starting Nmap 5.21 ( http://nmap.org ) at 2014-07-17 10:21 CEST Nmap scan report for localhost (127.0.0.1) Host is up (0.000079s latency). PORT STATE SERVICE 8983/tcp open unknown
As said by Thyamarkos, adding the host name in
/etc/jetty/jetty-rewrite.xml did the trick. Thanks!
<Set name="virtualHosts"> <Array type="java.lang.String"> <Item>localhost</Item> <Item>127.0.0.1</Item> </Array> </Set>