apache

Setting Clean URL with https(SSL) for the backend and http for the front end when Drupal is in a subdirectory/ subdomain

This write up needs (technical) review. Don't just copy and paste this code unless you have at least some understanding of the matter.

In Drupal 7 in order to run https(SSL) for the admin backend and run a normal http on the front I had to do the following. This code is intented for if the backend is running on a subdomain/ subdirectory on SSL with a different URL address then the http address of the front end, and with clean URLs enabled.

In settings.php:

if ($_SERVER['SERVER_PORT'] == 443) {
$base_url = 'https://address_1.com/subdirectory';
} else {
$base_url = 'http://subdomain.address_2.com';
}

The first $base_url is the one where you have your admin backend. The second is for your website front end. What this does is when you type the address check whether we are on a https or a http connection. Then the if the address match the $base_url either become a https or a http connection and go to the $base_url that is set.

Read more

Uniform Server Drupal 7 Setup

Uniform Server Drupal 7 Setup (Verbose)

An explicit guide to setting up an easy Drupal development environment utilizing the Uniform Server. “The Uniform Server is a WAMP package that allows you to run a server on any MS Windows OS based computer. It is small and mobile to download or move around and can also be used or setup as a production/live server.” http://www.uniformserver.com/

Mike Anello's (ultimike) video tutorial: http://www.youtube.com/watch?v=3SPyQ3KJLJg

In case of difficulty:
http://wiki.uniformserver.com/index.php/New_Users:_Problems_Section

The Uniform Server + Drupal 7 Installation Step-By-Step

Download the Uniform Server (version Coral 8.1.2) (Not the latest version; because Drupal needs PHP 5.3.10 and the latest is PHP 5.4.4 etc.)
http://sourceforge.net/projects/miniserver/files/Uniform%20Server/8.1.2-...

Double-click Coral_8_1_2.exe (the self-extracting file for Uniform Server, it will create a folder in the same directory called "UniServer").

Move the UniServer folder and its contents to where you want your application and new Drupal sites to reside:

(typically Users/(your name)/Sites/UniServer)
or E:/UniServer (on a RAM stick or SD card)

Read more

Making a Boost cached site mobile

Introduction

This tutorial is a description of how to setup the mobile version of a Drupal site with theme switching and automatic redirection to the mobile site that works with static page caching mechanisms (Boost module). Redirection is done on Apache's level instead of the PHP level (.htaccess instead of php code).

Read more

Installing Solr on Ubuntu

Installing Apache Solr on ubuntu requires several dependancies. The easiest and quickest way to install Solr on ubuntu currently is done with the package manager: apt

Invoke the following command and you should be able to get apache solr installed on Ubuntu:

sudo apt-get install solr-tomcat

Make sure the java 6 is installed on your machine:
sudo apt-get install sun-java6-jre sun-java6-plugin

Optional Setup: Drupal Search api integration

Optionally you can get drupal setup with drupal search api integration.

Use the Solr apache integration schema.xml and solrconfig.xml files to get up and running quickly.

Using the search api solr module copy those files and place them in your solr conf folder:

mkdir ~/solrconfig;
cd ~/solrconfig
wget drupalcode.org/project/search_api_solr.git/blob_plain/HEAD:/solr-conf/1.4/solrconfig.xml
wget drupalcode.org/project/search_api_solr.git/blob_plain/HEAD:/solr-conf/1.4/schema.xml
sudo cp -v *.xml /etc/solr/conf

Restart the tomcat service

service tomcat restart

Read more

Windows Download Instructions

Prerequisites

  • Unzip program for processing .tar.gz files. .tar.gz is a format Windows doesn't understand by default. This tutorial assumes you've downloaded and installed the freely available utility 7-Zip to allow you to extract .tar.gz files. A number of other file compression utilities are also available.

Download Drupal

  1. At the project download page, find the version you want to download. In this case, select the first Drupal 7 version under the section 'Official Releases.' Click on 'Download.' Save the file (don't open it with another program.)
  2. Uncompress the file. Right-click on the .tar.gz file and select 7-Zip >> Extract here. Right-click on the .tar file and repeat. You will now see the final Drupal folder. Drag and drop the folder where you need it to be.

    Note: If you extract the files into a folder other than your web site's folder, copy the contents of the Drupal folder into the appropriate web folder, rather than cutting/pasting them. (This will ensure the files will inherit the appropriate permissions for the web server.)

    Note:If you are using Apache instead of IIS skip the next two steps.

Read more

Step 6: Configure clean URLs

By default, Drupal uses and generates URLs for your site's pages that look like "http://www.example.com/?q=node/83." This style of URLs can be hard to read, and can prevent some search engines from indexing all the pages of your site. Research suggests this may not be as big of a problem for major search engines as it once was; however, it is worth noting the recommendation from Google's webmaster guidelines stating:

If you decide to use dynamic pages (i.e., the URL contains a "?" character), be aware that not every search engine spider crawls dynamic pages as well as static pages. It helps to keep the parameters short and the number of them few.

Read more
Subscribe with RSS Syndicate content
nobody click here