How to set Apache Solr admin password
Setting up the admin password.
Process:
1. Edit jetty.xml
To begin you are going to edit the file “server/etc/jetty.xml”. However, if you aren't sure of the location of jetty.xml, run the command
find / -name jetty.xml -type f
For me, the output was
How To Install Apache Solr 8.11 on CentOS/RHEL 7
Looking to install Solr on your server? Not sure if it worth the effort? Well, Apache Solr is the open-source, popular, super fast open source enterprise search platform from the Apache Lucene project. Written in Java, Solr is highly scalable, providing fault-tolerant distributed search and indexing.
Let's walk through the steps I went through to install Solr on Centos 7.
Step 1: Java
Check if Java is installed on your server:
Configure Nginx SSL + force HTTP to redirect to https and force non-www to www using Nginx configuration file only
Forcing https and www or non-www is a process that I was a custom to through .htaccess. In fact I had become very strong at managing and working my .htaccess files. However, what I had become strong in one area, I was oblivious to using other methods. My bad.
Argument 1 passed to Drupal\Core\File\FileUrlGenerator::generateString() must be of the type string, null given
blocking taxonomy terms from being indexed
Have you noticed through your Google account that there are items being indexed that shouldn't have been? One for me was taxonomy terms. Not important to be followed.
- Being indexed on my sitemap (do I just erase those entries on the XML file?)
- Being crawled (I am guessing this is with a robots.txt file though I have never created one before)
- Being viewed (stumbled upon) -> if this even possible to block?
Apache finding log4j2 version
Like many devs at the moment, looking for log4j2 on your server... how to do?
First I used the command
find / -name log4j2.xml -type f
Which in turn produced the following results
/opt/solr-8.5.2/server/resources/log4j2.xml /var/solr/log4j2.xml
Version
Ok, so log4j2 exists on the server the client is using... in Solr. How about determining the version number?
Install / uninstall modules and themes using composer
Using Composer to Manage Projects and if required their dependencies
In this section, we're going to dive into how to use Composer to manage project dependencies. Specifically, we'll cover the following:
Using Wireshark to sniff network packets
I’m recently doing an IoT project. I wanted to investigate the network layer, and to do so I use Wireshark to capture the network traffic between my iOS apps and IoT hardware.
Let’s see how to start packet sniffing using Wireshark!
How do I generate URL by term_id (tid) or node_id (nid)
When you have an entity ID value such as node ID (nid) or taxonomy term ID, how can you create the alias in a twig file? In other words, instead of /taxonomy/term/{tid} I would like to get the alias I have defined for this, eg: /some/path/to/my/term.
In trying to find an answer you might have queried your search criteria using something like
twig canonical taxonomy path twig canonical entity path twig canonical node path
How to check if a field exists in Drupal entity and not using PropertyExists
I had a couple of instances where I needed to check if an object field existed. Initially I used propertyExists. However, when running Solr, it tripped on this command. So some other function was required. And in steps hasField(). It is a good idea to validate the existence before using it to avoid any unexpected error.
Code:
$entity->hasField('fieldName');