diff --git a/plugins/solr/index.py b/plugins/solr/index.py index 5edfd4790..49f4430c8 100755 --- a/plugins/solr/index.py +++ b/plugins/solr/index.py @@ -106,11 +106,28 @@ def initDreplace(): if os.path.exists(log_file): public.writeFile(log_file, '') - rp_path = getServerDir() + "/server/solr/server/conf/etc/realm.properties" + # realm.properties + rp_path = getServerDir() + "/server/etc/realm.properties" rp_path_tpl = getPluginDir() + "/tpl/realm.properties" + # print rp_path + # print rp_path_tpl + + # if not os.path.exists(rp_path): content = public.readFile(rp_path_tpl) public.writeFile(rp_path, content) + # web.xml + web_xml = getServerDir() + "/server/solr-webapp/webapp/WEB-INF/web.xml" + web_xml_tpl = getPluginDir() + "/tpl/web.xml" + content = public.readFile(web_xml_tpl) + public.writeFile(web_xml, content) + + # solr-jetty-context.xml + solr_jetty_context_xml = getServerDir() + "/server/contexts/solr-jetty-context.xml" + solr_jetty_context_xml_tpl = getPluginDir() + "/tpl/solr-jetty-context.xml" + content = public.readFile(solr_jetty_context_xml_tpl) + public.writeFile(solr_jetty_context_xml, content) + return file_bin diff --git a/plugins/solr/tpl/realm.properties b/plugins/solr/tpl/realm.properties index 3bc6ebf7f..0747eaa19 100644 --- a/plugins/solr/tpl/realm.properties +++ b/plugins/solr/tpl/realm.properties @@ -1 +1 @@ -admin: admin \ No newline at end of file +admin: admin, admin \ No newline at end of file diff --git a/plugins/solr/tpl/solr-jetty-context.xml b/plugins/solr/tpl/solr-jetty-context.xml new file mode 100644 index 000000000..f31cd96e4 --- /dev/null +++ b/plugins/solr/tpl/solr-jetty-context.xml @@ -0,0 +1,17 @@ + + + + + /solr-webapp/webapp + /etc/webdefault.xml + false + + + + + Test Reaml + /etc/realm.properties + + + + diff --git a/plugins/solr/tpl/web.xml b/plugins/solr/tpl/web.xml new file mode 100644 index 000000000..b607de52c --- /dev/null +++ b/plugins/solr/tpl/web.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + SolrRequestFilter + org.apache.solr.servlet.SolrDispatchFilter + + + excludePatterns + /css/.+,/js/.+,/img/.+,/tpl/.+ + + + + + + SolrRequestFilter + /* + + + + LoadAdminUI + org.apache.solr.servlet.LoadAdminUiServlet + + + + + + RedirectOldAdminUI + org.apache.solr.servlet.RedirectServlet + + destination + ${context}/#/ + + + + + RedirectOldZookeeper + org.apache.solr.servlet.RedirectServlet + + destination + ${context}/admin/zookeeper + + + + + RedirectLogging + org.apache.solr.servlet.RedirectServlet + + destination + ${context}/#/~logging + + + + + SolrRestApi + org.restlet.ext.servlet.ServerServlet + + org.restlet.application + org.apache.solr.rest.SolrSchemaRestApi + + + + + RedirectOldAdminUI + /admin/ + + + RedirectOldAdminUI + /admin + + + RedirectOldZookeeper + /zookeeper.jsp + + + RedirectOldZookeeper + /zookeeper + + + RedirectLogging + /logging + + + + LoadAdminUI + /old.html + + + + LoadAdminUI + /index.html + + + + SolrRestApi + /schema/* + + + + .xsl + + application/xslt+xml + + + + index.html + + + + + + Disable TRACE + / + TRACE + + + + + + Enable everything but TRACE + / + TRACE + + + + + + solr + / + + + solr_home + admin + + + + + BASIC + Solr + + +