Quercus: Drupal
From Resin 3.0
(Corrected forum link) |
(Noted the need for Connector/J) |
||
Line 5: | Line 5: | ||
== installation == | == 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. | + | 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. This example also uses MySQL as Drupal's database. In order to connect to MySQL through Java, you will need to download MySQL Connector/J and install the jar file in resin/lib. |
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: | 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: |
Revision as of 16:22, 12 June 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. This example also uses MySQL as Drupal's database. In order to connect to MySQL through Java, you will need to download MySQL Connector/J and install the jar file in resin/lib.
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>