How To Instantly Index A Node To Apache?
BY webmaster
5 months ago
comments comment

Have you been trying to index your node to Apache immediately after its been created, updated or deleted! Read On!!

By default Apache Solr uses a queue system to index data to Solr. We can preconfigure the interval in which the indexing should perform. Still, there occurs a delay for the node to get indexed.

There exists a module which does our job of instantly indexing the nodes to Apache. The module Apache Solr Real-Time implements real-time commits of Drupal entities with the Apache Solr Search Integration project, removing the delay between making a change on your site, and that change becoming visible in Solr search results.

This module uses Soft Commit for Solr version above 4.x thus minimizing Solr server resources.

Also, this module uses hook_entity_update, hook_entity_delete to update the current entity to Solr.

Unfortunately this module only supports the entity "node". For instantly indexing your custom entities you can use the above hooks and use the apachesolr_index_entity_to_documents function, which is provided by Apache Solr to index the current entity to Solr.

Happy Coding!



on 11th June 2008 / by webmaster
Most of the web based systems that we build at Zyxware uses Drupal as the content framework. The following are the steps involved in setting up Apache, PHP, MySQL and Drupal on a freshly installed Ubuntu 8.04 system. If you follow the instructions you should be able to set it up as is but if you face problems let us know and we will try to help you. This is divided into subsections each dealing with a specific task. 1. Apache2 Server Setup 2. Installing MySQL and PHP5 3. Installing Drupal & Configuring Drupal 4. Clean URLs Configuration in Apache2 for Drupal 5. Other Tweaks Apache2, MySQL, PHP Setup 1. Run the following command to install apache on your machine sudo apt-get install apache2 libapache2-mod-php5 sudo apt-get install mysql-client mysql-server mysql-query-browser mysql-admin mysql-navigator php5-mysql php5-gd sudo /etc/init.d/apache2 restart 2. Install PHPMyAdmin. After this, make changes in the confinguration file to support PHPMyAdmin. You can skip this step if you prefer to use MySQL GUI based administration. sudo apt-get install phpmyadmin sudo gedit /etc/apache2/httpd.conf At the bottom add the following # Enable PHPMyAdmin Include /etc/phpmyadmin/apache.conf sudo /etc/init.d/apache2 restart 3. Enable usedir module in apache2 to allow URLs of the following format http://localhost/~username. Also enable mod_rewrite to allow for Drupal Clean URLs cd /etc/apache2/mods-enabled sudo ln -s ../mods-available/userdir.load sudo ln -s ../mods-available/userdir.conf sudo ln -s ../mods-available/rewrite.load sudo /etc/init.d/apache2 reload 4. Create folder /home/<username>/public_html -- > this is the folder which we are going to use as the document root for local development. So you will be accessing your local websites as http://localhost/~username/sitename 5. Edit /etc/apache2/mods-available/userdir.conf and change the AllowOverride line to just read AllowOverride All Install Drupal 1. Download the latest drupal version from and extract it to the folder of your choice under ~/public_html. Say ~/public_html/drupal 2. In the drupal folder change permissions of /default/settings.php to 766 to make it writable to by all users 3. Once the things has been completed access the directory through the browser. If you had named the drupal folder as drupal you can now access it as http://localhost/~username/drupal 4. Create a database named drupal_db (your choice) in MySQL through the MySQL Query Browser or throuh the mysql command line client for Drupal. Also create a user for drupal. You can do by running the following query GRANT ALL PRIVILEGES ON drupal_db.* TO 'some_username'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION; 5. After a couple of simple questions to be answered Drupal should be up and running. Configuring Drupal Clean URLs converts the querystrings that come in a normal URL into an integral part of the URL. By enabling Clean URLs you would improve the readability of the URL and also increase your google page ranking. We had already enabled mod_rewrite above. So we just have to make sure that Clean Urls is enabled in Drupal administration Other Tweaks Install sendmail to be able to send out mails from drupal. sudo apt-get install sendmail Edit: We have updated the information about enabling userdir module and its configuration. Thanks Kirri Ubuntu Web Development Apache PHP MySQL Leave a reply Your email address will not be published. Required fields are marker * Tim (not verified) access_time 24 May 2019 - 16:44 I checked the apache2.conf file and the lines of code in step 9 do not appear. To this point i have followed the instructions exactly, until step 11. I even tried to add the code manually but the gedit /etc/apache2/apache2.conf didn't work. Any ideads what i may be doing wrong? I tried skipping over and finishing the steps but didn't work and i ended up reinstalling ubuntu and starting over. Now i don't want to move on till i get each step. Thanks for any help you can give me. Tim (not verified) access_time 24 May 2019 - 16:44 When i try to open the /var/www/sites/default/settings/php firefox just stries to download it, instead of open it... I can't figure out why. Kirri (not verified) access_time 24 May 2019 - 16:44… This way is much easier. We don't need to change the contents of apache2.conf and httpd.conf. I tested it. PlusNoob (not verified) access_time 24 May 2019 - 16:44 am wondering if this would work at all on f.ex FreeBSD, anyone who know? directory (not verified) access_time 24 May 2019 - 16:44 Step by step its looking easier I,ll try this if i found anything new I,ll definitely share with you grate work keep it on thanx for a valuable information Pagination Current page 1 Page 2 Next page Next › Last page Last » Add new comment

on 15th June 2012 / by deepa.n
Password-protecting drupal development site with .htaccess file There might be few scenarios when we need to protect our site from the general public and make it accessible to a selected group of users. One of the most common scenarios in the development workflow of a Drupal site is when you want to avoid your half-complete drupal site showing up in Google search results.For such needs, it is advisable to go for password-protecting the site using HTTP authentication. If you have cPanel installed on your hosting server, you can use the ‘Password Protect Directories’ option from the ‘Security’ section on the cPanel home page. Click here to read on How to enable HTTP Authentication using cPanel (link to an article for the same on our site) For those without cPanel, here’s how to get Apache work your way: Password protection on directories using .htaccess and .htpasswd: On a hosting server running using apache as the webserver, you need to do the following things to add HTTP Authentication (password protection) to your site: Create .htpasswd file Add/modify .htaccess file 1. Create .htpasswd file .htpasswd (do not forget to add the ‘.’ before htpasswd) is the file that stores the HTTP username and password. You need to tell Apache to verify against the credentials given in .htpasswd. First, to create .htpasswd with the desired username and password, SSH into your server (or open up a terminal window on your local machine, cd (change directory) to the folder where you want to create your password file, and type in the following command: htpasswd -c .htpasswd You'll be prompted to enter and retype your password, then the .htpasswd file will be created for you. Here’s what it looks like: user@user-desktop:~$ htpasswd -c .htpasswd userjohn New password: Re-type new password: Adding password for user userjohn If you open up the file, you can see the username and encrypted password generated. It looks something like this: userjohn:lOy81yOkKmeXc Step2: Add/modify .htaccess file .htaccess (that too, with the ‘.’), is the file that tells apache what custom settings to use for the site. What we have to do here is that we have to add the setting in .htaccess that tells apache to use the password in .htpasswd. Drupal has a default .htaccess file in its root. You just have to put in the following lines of code to your .htaccess file: AuthUserFile //.htpasswd AuthType Basic AuthName "Restricted Access" Require user userjohn is the path to the file from the Web server's root folder - for example, /home/username/.htpasswd or C:\wwwroot\username\.htpasswd. The above .htaccess file will password protect all files in the folder that it is placed in, and all sub-folders under that folder. For protecting your entire site, just place it in your web root. Apache Server Administration Drupal Security Web Security Access Control Leave a reply Your email address will not be published. Required fields are marker * website (not verified) access_time 24 May 2019 - 12:57 Hey this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I'm starting a blog soon but have no coding experience so I wanted to get guidance from someone with experience. Any help would be enormously appreciated! Add new comment

on 29th June 2012 / by Anoop John
Apache allows you to protect contents of specific directories in your website or the whole website from unauthorized access using a mechanism called httpd password protection. During development of new sites the partially built sites are protected from unauthorized access using httpd authentication. This could sometimes interfere with testing of integration with third party services that might expect some of your URLs to be accessible without authentication. Here is how you can exclude a given file or directory from httpd authentication The standard set of lines in htaccess to enabled httpd authentication is as follows AuthType Basic AuthName "Auth Required" AuthUserFile /path/to/.htpasswd Require valid-user Now adding the following below this will allow you to exclude directories and files # Allow access to excluded diretories SetEnvIf Request_URI "path/to/excluded/directory/" allow SetEnvIf Request_URI "path/to/excluded/file" allow Order allow,deny Allow from env=allow Satisfy any If you wrap the above in a <Limit GET> section you can limit the authentication to GET requests only. You can also allow access from specific IP addresses by adding the following for each IP you wish to allow Allow from Apache Server Administration Drupal Security Web Security Access Control Leave a reply Your email address will not be published. Required fields are marker * Muddy Mind (not verified) access_time 24 May 2019 - 12:57 Nice work this helps me a lot to some basic changes in my blog :) Add new comment
Leave a reply
Your email address will not be published. Required fields are marker *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.