Re: Adding virtual host in Jetty (Solr deployed)
On 2/1/2018 5:40 AM, solr2020 wrote: We have installed solr which is running in jetty 9x version. We are trying to change the default solr url to required URL as given below. Default url: http://localhost:8983/solr Required URL :http://test.com/solr To achieve this we are trying to configure virtual host in jetty (solr-jetty-context.xml) with the below jetty documentation reference (https://wiki.eclipse.org/Jetty/Howto/Configure_Virtual_Hosts). But it is not working. You don't need to configure anything in Jetty to get a hostname to work. Just set up DNS or /etc/hosts properly. As long as a name lookup obtains the correct IP address, Jetty/Solr will respond to it. No verification of the hostname is done. Getting Solr to answer on port 80 will likely require administrative privileges (root on an OS like Linux). This is an OS requirement, not a Jetty requirement. If it were me, I would set up a load balancer in front of Solr to answer on port 80 and forward the requests to whatever port Solr is actually running on. Why do you want to change to port 80? The most likely reason I can imagine is that you're going to put your Solr server on the Internet. You should *NOT* do that. Unless you put some kind of proxy server in front of it that can detect and deny attempts to change the index, it's going to be a target and attackers are going to make your life very difficult. Even if you prevent public users from changing the index, they can still send denial of service queries. Thanks, Shawn
Re: Adding virtual host in Jetty (Solr deployed)
We have added virtualHosts block in solr-jetty-context.xml file under /opt/solr/server/contexts and then restarted solr(jetty). After this while trying to access solr using the url http://www.host.com:8983/solr it says site can't be reached. http://www.eclipse.org/jetty/configure_9_0.dtd;> /solr-webapp/webapp /etc/webdefault.xml false 10.x.x.x test www.host.com -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Adding virtual host in Jetty (Solr deployed)
On 01/02/2018 12:40, solr2020 wrote: Hi, We have installed solr which is running in jetty 9x version. We are trying to change the default solr url to required URL as given below. Default url: http://localhost:8983/solr Required URL :http://test.com/solr To achieve this we are trying to configure virtual host in jetty (solr-jetty-context.xml) with the below jetty documentation reference (https://wiki.eclipse.org/Jetty/Howto/Configure_Virtual_Hosts). But it is not working. You're going to need to give more details I'm afraid, such as exactly what you expect it to do and what happens when you test it. Cheers Charlie -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html -- Charlie Hull Flax - Open Source Enterprise Search tel/fax: +44 (0)8700 118334 mobile: +44 (0)7767 825828 web: www.flax.co.uk
Adding virtual host in Jetty (Solr deployed)
Hi, We have installed solr which is running in jetty 9x version. We are trying to change the default solr url to required URL as given below. Default url: http://localhost:8983/solr Required URL :http://test.com/solr To achieve this we are trying to configure virtual host in jetty (solr-jetty-context.xml) with the below jetty documentation reference (https://wiki.eclipse.org/Jetty/Howto/Configure_Virtual_Hosts). But it is not working. -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html