11/30/2021

Drupal Iis

Deploy drupal iis to bare metal and public or private clouds using the Juju GUI or command line. Drupal is a dynamic web site platform which allows an individual or community of users to publish, manage and organize a variety of content, Drupal integrates many popular features of content management systems, weblogs, collaborative tools and discussion-based community software into one easy-to-use package. There isn't much IIS needs to do to make multi-sites to work - It's more with how you name your folders and have your settings.php file. You need to point IIS to the drupal/sites folder and that's it on that end. But then you need to name you sites folders appropriately such that they are the same as what you have your IIS host header.

  1. Drupal 9 Is
  2. Iis Drupal 8
  3. Drupal Windows Iis
  4. Php Iis Server

Description

Drupal Iis

Drupal is a dynamic web site platform which allows an individual orcommunity of users to publish, manage and organize a variety ofcontent, Drupal integrates many popular features of contentmanagement systems, weblogs, collaborative tools and discussion-basedcommunity software into one easy-to-use package.

  • Series:
  • Tags:

Drupal is a free and open-source content-management framework written in PHP and distributed under the GNU General Public License. It is used as a back-end framework for at least 2.1% of all Web sites worldwide ranging from personal blogs to corporate, political, and government sites.

General Usage

To deploy a Drupal service on IIS:

As a database backend, one of the following relational databases can be used: MySQL, PostgreSQL or MSSQL.

To add a relation with the MySQL database charm:

IisDrupal Iis

To add a relation with the PostgreSQL database charm:

To add a relation with the SQL Server Express database charm:

Scale out usage

To add another unit to your deployment:

To deploy a memcached server and add memcache caching to the Drupal deployment.

To add a reverse proxy relation with haproxy and distribute connections from one frontend port to your charm units.

  • site-name - Name of the Drupal website.

  • site-mail - E-mail used by Drupal to send notifications.

  • admin-user-name - User name used by admin account.

  • admin-password - Password used by the admin account.

  • admin-mail - E-mail of the administrative account 'admin'.

  • php-max-execution-time - The maximum execution time in seconds a PHP script is allowed to take.

  • php-max-requests - Maximum number of request for the IIS PHP handler.

To dynamically change a config option:

Configuration

admin-mail
(string) E-mail used by the admin user.
[email protected]
admin-password
(string) Password used by the admin user.
admin-user-name
(string) Admin user name used by Drupal website. This is set only at database initialization.
admin
database-name
(string) Database name
drupal
database-user-name
(string) Database user name
drupal
drupal-url
(string) Download link for the zip archive with Drupal 7 core files.
http://ftp.drupal.org/files/projects/drupal-7.35.zip#sha1=C8125AC88865D586358738E6A5CC5FB63545C621
drush-url
(string) Download link for the Drush 6 zip archive.
https://github.com/drush-ops/drush/releases/download/6.6.0/windows-6.6.0.zip#sha1=2BD5459022B395CD4E99D644E1708F1B0796484C
iis-website-port
(int) Port used by the Drupal IIS website. After a fresh instalation ofIIS, port 80 is already used by 'Default Web Site'.
8080
memcache-extension-url
(string) Download link for the zip archive with Memcache PHP 5.4 NTS (x86)extension for Windows.
http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/php_memcache-3.0.8-5.4-nts-vc9-x86.zip#sha1=D0938BA13DFC880A4AC6369D8278C80A45D60B2D
memcache-url
(string) Download link for the zip archive with Drupal's memcache module.
http://ftp.drupal.org/files/projects/memcache-7.x-1.5.zip#sha1=33D3CE9426C3B35839B6083D21B120E65F4B4C1D
mssql-drivers-url
(string) Download link for the zip archive with Drupal MSSQL drivers.
http://ftp.drupal.org/files/projects/sqlsrv-7.x-1.3.zip#sha1=CF7BD04A9D9AFB3139F4124CE590D224256F968E
mysql-url
(string) Download link for the MySQL Windows client installer. This is neededwhen creating a database relation with the MySQL charm.
https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.43-win32.msi#sha1=5A824BF80D1F8DB451492456AE330BB8ADB13B39
pgsql-url
(string) Download link for the PostgreSQL 9.4.x (x86) zip archive with Windowsbinaries.
http://get.enterprisedb.com/postgresql/postgresql-9.4.1-3-windows-binaries.zip#sha1=AD72A59FB0ED7E8BE0C4084C5D2EC604D25C718B
php-max-execution-time
(int) The number of seconds a PHP script is allowed to run. If this isreached, the script returns a fatal error.
300
php-max-requests
(int) Maximum number of request for the IIS PHP handler.
10000
php-mssql-drivers-url
(string) Download link for the PHP MSSQL Drivers installer.
http://download.microsoft.com/download/C/D/B/CDB0A3BB-600E-42ED-8D5E-E4630C905371/SQLSRV32.EXE#sha1=FBCA0921E916BED0013422A3446B125BB4EDE6FB
php-url
(string) Download link for the PHP 5.4.x VC9 (x86) NTS zip archive.
http://windows.php.net/downloads/releases/archives/php-5.4.38-nts-Win32-VC9-x86.zip#sha1=6CE8F2B92C99FDCBF46E869999DFA6E42E3748E4
scmd-url
(string) Download link for the MSSQL Command Line Utilities 11 (x64) installer.
http://download.microsoft.com/download/4/B/1/4B1E9B0E-A4F3-4715-B417-31C82302A70A/ENU/x64/SqlCmdLnUtils.msi#sha1=B56B0FAF011ADDD810D5A3624DF1702EB02B4A12
site-mail
(string) E-mail address used by Drupal to send notifications such as passwordchanges and e-mails sent during registration.
[email protected]
site-name
(string) Name of the Drupal website.
Drupal IIS Web Site
sncli-url
(string) Download link for the MSSQL 2012 Native Client (x64) installer.
http://download.microsoft.com/download/4/B/1/4B1E9B0E-A4F3-4715-B417-31C82302A70A/ENU/x64/sqlncli.msi#sha1=789CD5F898F80A799F0288F140F3FBCDF0473DE8
sodbc-url
(string) Download link for the MSSQL ODBC Driver 11 (x64) installer.
https://download.microsoft.com/download/5/7/2/57249A3A-19D6-4901-ACCE-80924ABEB267/ENU/x64/msodbcsql.msi#sha1=29612EC37A68ECA540BAC8ADBA1C429F8F869E26
ur-url
(string) Download link for the IIS URL Rewrite Module version 2 (x64) installer.
http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi#sha1=84BDEAEF26BCB2CB60BB8686EAF6194607F7F003
vc12-url
(string) Download link for the Microsoft Visual C++ 2013 Redistributable (x86)version 12 installer.
http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe#sha1=DF7F0A73BFA077E483E51BFB97F5E2ECEEDFB6A3
vc9-url
(string) Download link for the Microsoft Visual C++ 2008 SP1 Redistributable (x86)version 9 installer.
http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe#sha1=6939100E397CEF26EC22E95E53FCD9FC979B7BC9
-->

by Ruslan Yakushev

Introduction

Drupal is a free, open-source content management system (CMS) software that lets individuals or communities of users easily publish, manage, and organize a wide variety of content on a Web site.

For more information about Drupal, visit the Drupal Web site.

This article describes how to install and configure Drupal for use with the FastCGI extension on Internet Information Services 7 (IIS 7) and above on Windows® Web Server 2008. The instructions assume that you have set up and configured the FastCGI extension and the PHP libraries. The instructions have been tested and found to work with the following software versions:

  • PHP 5.2.9
  • MySQL 5.1.34
  • Drupal 6.14

Drupal 9 Is

Prerequisites

From the base default configuration file provided by PHP, modify the following lines in your Php.ini configuration:

  • Define extension_dir as c:phpext (for example, the location of your PHP extensions directory).
  • Uncomment extension=php_mysql.dll in the extensions list to enable MySQL support.

In order for Drupal to work correctly with IIS 7 and above, it is necessary to install an update for the IIS FastCGI module for IIS 7.

Download and Unpack the Application

First, download the latest stable release of Drupal. For this article, Drupal version 6.14 was used (future versions are likely to be similar to install). Uncompress the Drupal files and copy them to C:Inetpubwwwrootdrupal (or another directory of your choosing).

Before running the Drupal installer, create the configuration file Settings.php, which Drupal uses to store key configuration settings. Assign write permissions to it with the command (from the installation directory):

  1. Copy the .sitesdefaultdefault.settings.php file to .sitesdefaultsettings.php.

  2. Grant 'write' permissions to the file.

  3. The installer will modify the Settings.php file with information provided during the installation process.

  4. Check to ensure that the file permissions are set back to 'read only' once the installation is complete. If the file permissions did not change back, you must change them manually with the command:

  5. Drupal uses the SitesDefaultFiles directory to store temporary files and therefore must be able to write and modify files in this folder.

  6. Create the folder:

  7. Grant 'modify' permissions to the folder:

Set Up the Database

Before starting the installation procedure for Drupal, you must create a database on your server. Also create a user and grant this user 'db ownership' permission to the database. This article uses the following database information:

Iis Drupal 8

  • Database name: drupal
  • Database user: drupal
  • Account password: drupal

Run the Installation Script

Drupal Iis
  1. Open a Web browser, and go to http://localhost/drupal/. The first page of the installation script appears. Click Install Drupal in English. The Verify requirements step should proceed automatically unless you are missing requirements.


    Figure 1: Choose language page

  2. On the Database configuration page, type the following information:

    • Database name: drupal

    • User name: drupal

    • Password: drupal

      Click Save and continue. The required database tables are created, and the configuration is saved into the SitesDefaultSettings.php file. Remove the 'modify' permissions on this file.


      Figure 2: Database configuration page

  3. On the Configure site page, enter the required configuration information.


    Figure 3: Configure site page

Enable Clean URLs

Drupal Windows Iis

By default, Drupal uses query string parameters for all the URLs it generates for your Web site. With the URL Rewrite Module, however, you can create 'clean URLs.'

IIS 6.0 does not have URL rewriting capabilities, so you can use a third-party URL rewriting product such as ISAPI Rewrite or Ionics ISAPI Rewrite Filter.

IIS 7 and above have URL rewriting support, which can be enabled by installing the URL Rewrite Module.

The following instructions describe how the URL Rewrite Module for IIS 7 and above can be used to enable clean URLs in Drupal.

Drupal 9 is
  1. Open the Web.config file located in C:inetpubwwwrootdrupal folder. If you do not have a Web.config file in the drupal directory, create it.

  2. Copy and paste the following XML code into this file.

  3. Save the web.config file.

  4. Open a Web browser, and go to http://localhost/Drupal/index.php?q=admin/settings/clean-urls.
    Figure 4: Clean URLs page

  5. Under Clean URLs, select the Enabled option button, and then click Save configuration. If you successfully changed the URL format, all the URLs are represented in a hierarchical form that does not use query string parameters (for example, http://localhost/Drupal/admin/settings/clean-urls).

Note

This article updates: ' Drupal on IIS' by Ruslan Yakushev, published on September 19, 2008.

Links for Further Information

Php Iis Server

  • Setting up FastCGI for PHP.
  • Using FastCGI to Host PHP Applications on IIS 7.0 and Above.
  • Installing PHP on Windows Vista with FastCGI.
  • Installing FastCGI Support On Server Core.
  • FastCGI forum.
  • PHP community forum.
  • Clean URLs on IIS.