Hallo,
I am configuring Solr. Everything ist working fine but one thing appears to be weird to me.
I have Solr running on Tomcat. My Solr_home ist defined somewhere on my hard drive through JNDI. For some reason Solr creates on startup a new folder of solr inside of Tomcat's Webapps folder with the lib files and the index. That alone would make me think that I somehow defined Solr_home wrong but Solr is using the schema and config out of the real Solr_home. I just can't get any sense into that. Is that how Solr works or can anyone give me a hint on how I can force Solr to saving the index into my defined Solr_home?
Have a look at setting the solr.data.dir. See here. The default is ./solr/data which I suppose is relative to the webapps path.
Related
I need to change the root directory for one of my domains,
But in my cpanel i dont find any options, just hard cores of system, but i have very basic knowledge about systems and servers.
How i can change that directory as easy as possible? I just need to change something because im gonna install laravel, and i want to change the public html to the public of laravel.
I was looking for the file that has the apache config, but it says like "the current config doesnt need to be changed or updated, bacause can be overryde", so i tought in Cpanel maybe i got an option for this.
Thanks, By the way i got an VPS, not shared. Using CENTOS 7.9.
Thanks and good night ^^
In cPanel, you can't change main domain directory/document root. If you want to change the document root, just change the main domain to another/random domain. Then add the domain that you want to change the root directory as addon domain
It's not recommended overriding Apache config. It's may break your system. WHM/cPanel exists to manage domains without a system admin knowledge
Do you try change this using console in Centos?
maybe will be better using console and open the file that contain the directory root
I am trying to setup Basic Authentication for SOLR, and trying to follow their instructions: https://lucene.apache.org/solr/guide/6_6/basic-authentication-plugin.html
I created the security.json file, and now it says that I am supposed to put it in the $SOLR_HOME directory, if the instance is a standalone instance (which it is).
Where exactly is $SOLR_HOME? I googled to see that it's supposed to be where the solrconfig.xml or schema.xml file is, but because SOLR has multiple cores, those files exist in EVERY conf folder in EVERY core. So where is this file supposed to go?
$SOLR_HOME should be configured to point to the root of the cores and there should be a corresponding "solr.xml" in that location. You can copy the solr.xml from the Solr install directory under /server/solr/solr.xml
Edit: Clarifying what I mean by "root of the cores". The parent folder. If you have multiple cores; each core will be contained in it's own folder. The $SOLR_HOME is the parent folder to these.
$SOLR_HOME is where a new core is placed when it's created as well. In our case, the default install made that /var/solr/ with each core inside /var/solr/data/[corename].
Okay, so I've searched everywhere and while I can find plenty of stuff about moving a Drupal install out of a subdirectory I can't find anything on moving one into a subdirectory. I've recently taken over this project and it was developed without me so I've been landed in it here.
The problem is that the site was developed in the root of a dev server and I now have someone who wants it in a subdir. I've changed the base url in the htaccess and I've tried manually changing references in the CSS and DB but I can't be sure I've caught everything (modules etc).
What I want to know is, is there a way to force every link relative to the root to be relative to root/example instead. Basically everything that was once at www.example.com is now at www.example.com/subdirectory.
Thanks.
There's two pieces to this. The first you've already done: configuring htaccess to set a base url that includes the subdirectory.
Unfortunately, you may have quite a few references in the node content (especially embedded images) that will stop working.
A relatively simple solution to this would be to include a <base href="foo.com/dir" /> tag in your site theme, but this isn't a great fix in the long term.
You can try modifying your database directly, through queries such as the following (use with care, backup your database ahead of time, etc):
UPDATE field_revision_body SET body_value = REPLACE(body_value, 'devdomain.com', 'proddomain.com/subdir') (add http:// into those queries)
You may also need to update the paths in your files table to reflect the new locations on disk, especially if you're using multisite.
Alternately, have you considered using the Backup & Migrate module to move content from the dev server to a new install at the new instance?
What are the best steps to take to prevent bugs and/or data loss in moving servers?
EDIT: Solved, but I should specify I mean in the typical shared hosting environment e.g. DreamHost or GoDaddy.
Bootstrap config is the smartest method (Newism has a free bootstrap config module). I think it works best on fresh installs myself, but ymmv.
If you've been given an existing EE system and need to move it, there are a few simple tools that can help:
REElocate: all the EE 2.x path and config options, in one place. Swap one URL for another in setup, check what's being set and push the button.
Greenery: Again, one module to rule them all. I've not used this but it's got a good rating.
So install, set permissions, move files and and DB, and then use either free module. If you find that not all the images or CSS instantly comes back online, check your template base paths (in template prefs) and permissions.
I'm also presuming you have access to the old DB. If not, and you can't add something simple like PHPMyAdmin to back it up, try:
Backup Pro(ish): A free backup module for files and db. Easy enough that you should introduce it to the site users (most never consider backups). All done through the EE CP. The zipped output can easily be moved to the new server.
The EE User Guide offers a reasonably extensive guide to Moving ExpressionEngine to Another Server and if you follow all of these steps then you will have everything you need to try again if any bugs or data loss occur.
Verify Server Compatibility
Synchronize Templates
Back-up Database and Files
Prepare the New Database
Copy Files and Folders
Verify File Permissions
Update database.php
Verify index.php and admin.php
Log In and Update Paths
Clear Caches
As suggested by Bitmanic, a dynamic config.php file helps with moving environments tremendously. Check out Leevi Graham's Config Bootstrap for a quick and simple solution. This is helpful for dev/staging/prod environments too!
I'd say the answer is the same as any other system -- export your entire database, and download all of your files (both system and anything uploaded by users - images, etc). Then, mirror this process by importing/uploading to the new server.
Before I run my export, I like to use the Deeploy Helper module to change all of my file paths in EE to the new server's settings.
Preventing data loss primarily revolves around the database and upload directories.
Does your website allow users to interact with the database? If so at some point you'll need to turn off EE to prevent DB changes. If not that you don't have too much to worry about as you can track and changes on the database end between the old and new servers.
Both Philip and Derek offer good advice for migrating EE. I've also found that having a bootstrap config file helps tremendously - especially since you can configure your file upload directories directly via config values now (as of EE2.4, I think).
For related information, please check out the answers to this similar Stack Overflow question.
I'm running couchdb 1.0.1 on ubuntu and everything is working OK - except that I've just seen that my log files are non existent. They seem to have been like this for nearly a year, but to be fair I haven't really been using the system as it is a test bed for a project I've just picked up again.
/var/log/couchdb contained 2 files. An old (many months!) couch.log.1 and a couch.log with size 0 - which is suspicious. I've deleted the old files and now tried restarting couch, but the log files stubbornly stay absent!
I've restarted couch using
/etc/init.d/couchdb restart
But no joy.
My local.ini file has this entry;
[log]
level = debug
file = /var/log/couchdb/couch.log
And /var/log/couchdb is owned by couchdb and is in group couchdb so I don't think it is a permission issue. There is plenty of disk space on the server too.
I've rebooted the server as well in frustration - no difference.
How do I persuade couchdb to start logging anything again? The reason it has become an issue is that I'm trying to PUT some standalone attachments, but only the small ones are working so I'm trying to look in my (non-existent) log files to see what the problem might be.
Any ideas?
There is a possibility that the log file configuration is being set by some other .ini file.
Issue a GET request to http://localhost:5984/_config/log to see what CouchDB has set.
I had stuff like this happen to me because I had installed CouchDB multiple times using different methods. (compiling from source, using apt, the install script that was put out by CouchOne at one point, etc.) It was hard to figure out exactly what local.ini was the real one!
OK so it looks as if my LIVE ini files were actually at /usr/local/etc/couchdb/local.ini and not /etc/couchdb/local.ini
And the real logs were in /usr/local as well.
Not quite sure why I had both sets, I guess I had installed couchdb a couple of times in the past and I was looking in the legacy files by mistake!
Hope this helps someone else ... I have been scratching my head for a couple of hours over it now!