Quercus: Drupal

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
Line 15: Line 15:
 
== resin-web.xml configuration file ==
 
== resin-web.xml configuration file ==
  
The [resin-web.xml] file is placed in [webapps]/drupal/WEB-INF/resin-web.xml.
+
The [[resin-web.xml]] file is placed in [webapps]/drupal/WEB-INF/resin-web.xml.
  
Configuring the <[database]> is optional, but allows you complete control over the database connections Drupal uses.  If you do not configure the <[database]>, Quercus will create a new database pool automatically.
+
Configuring the <[[database]]> is optional, but allows you complete control over the database connections Drupal uses.  If you do not configure the <[[database]]>, Quercus will create a new database pool automatically.
  
The <[rewrite-dispatch]> lets you use clean URLs, so your paths will look like http://windansea.caucho.com/forum instead of http://windansea.caucho.com/index.php?q=forum
+
The <[[rewrite-dispatch]]> lets you use clean URLs, so your paths will look like http://windansea.caucho.com/forum instead of http://windansea.caucho.com/index.php?q=forum
  
 
  <web-app xmlns="http://caucho.com/ns/resin">
 
  <web-app xmlns="http://caucho.com/ns/resin">

Revision as of 15:26, 12 January 2006


Drupal, a forum/blog content management system, now works on Quercus (requires the latest snapshot or 3.0.18). The Caucho Forum is now running using Drupal.

installation

Drupal requires JavaMail to send user confirmation and passwords. You will need to download JavaMail from the Sun site and install it in resin/lib for Drupal to work.

To install Drupal, just expand the Drupal .tar file into [webapps]/drupal (or [webapps]/ROOT). From there, follow the Drupal documentation. Essentially, you'll just need to:

  • modify drupal/sites/default/settings.php (to set the expected URL)
  • create the database with 'mysql drupal < drupal/database/database.mysql'
  • Add a drupal/WEB-INF/resin-web.xml to configure Quercus and modify the URLs

resin-web.xml configuration file

The resin-web.xml file is placed in [webapps]/drupal/WEB-INF/resin-web.xml.

Configuring the <database> is optional, but allows you complete control over the database connections Drupal uses. If you do not configure the <database>, Quercus will create a new database pool automatically.

The <rewrite-dispatch> lets you use clean URLs, so your paths will look like http://windansea.caucho.com/forum instead of http://windansea.caucho.com/index.php?q=forum

<web-app xmlns="http://caucho.com/ns/resin">
  <database jndi-name="jdbc/drupal">
    <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
      <url>jdbc:mysql://localhost:3306/drupal</url>
      <user>root</user>
      <password></password>
    </driver>
  </database>

  <servlet servlet-name="php"
           servlet-class="com.caucho.quercus.servlet.QuercusServlet">
    <init database="jdbc/drupal"/>
  </servlet>

   <servlet-mapping url-pattern="*.php" servlet-name="php"/>
  <welcome-file-list><welcome-file>index.php</welcome-file></welcome-file-list>

  <rewrite-dispatch>
    <dispatch regexp="\.(php|gif|css|jpg|png|ico|js)"/>
    <forward regexp="^/" target="/index.php?q="/>
  </rewrite-dispatch>
</web-app>
Personal tools