Quercus: Wordpress Mu
From Resin 3.0
(Difference between revisions)
(Checkpoint, still need DNS setup) |
(chanced host config) |
||
(8 intermediate revisions by one user not shown) | |||
Line 11: | Line 11: | ||
==Full installation== | ==Full installation== | ||
+ | # Add a wildcard entry to your DNS record (usually of the form *.example.com, [http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/ details here]) | ||
# Download WordPress Mu 1.5.1 from http://mu.wordpress.org/download/ | # Download WordPress Mu 1.5.1 from http://mu.wordpress.org/download/ | ||
− | # Download Resin 3.2.0 from http://www.caucho.com/download | + | # Download Resin Pro 3.2.0 from http://www.caucho.com/download |
− | # Unzip Resin 3.2.0 in /usr/local/share | + | |
+ | '''Do the following steps as root, either logging in as root or using sudo.''' | ||
+ | # Unzip Resin Pro 3.2.0 in /usr/local/share | ||
+ | # Add the user "resin": <pre>useradd resin</pre> | ||
+ | # Change the ownership of the Resin Pro directory to "resin":<pre>chown -R resin:resin /usr/local/share/resin-pro-3.2.0</pre> | ||
+ | # Create the directory /var/www/hosts | ||
+ | # Change the ownership of the directory to "resin":<pre>chown resin:resin /var/www/hosts</pre> | ||
# Copy /usr/local/share/resin-3.2.0/conf/resin.xml to /etc/resin/resin.xml | # Copy /usr/local/share/resin-3.2.0/conf/resin.xml to /etc/resin/resin.xml | ||
− | # | + | # Change the ownership of /etc/resin/resin.xml to "resin":<pre>chown resin:resin /etc/resin/resin.xml</pre> |
− | #:<pre><http address="*" port=" | + | |
− | # | + | '''Do the following as user "resin", unless otherwise specified''' |
− | #:<pre> | + | # Run the following within /usr/local/share/resin-pro-3.2.0:<pre>./configure; make; make install</pre> |
− | #:<host | + | # Place your Resin license in /usr/local/share/resin-pro-3.2.0/licenses |
− | #: <host- | + | # Edit /etc/resin/resin.xml: |
− | #: | + | ## Change the line |
− | #: <web-app id="/" root-directory="/var/www/hosts/default/webapps/ROOT"/> | + | ##:<pre><http address="*" port="8080"/></pre> |
− | #: | + | ##:to |
− | #: <web-app id="/resin-admin" root-directory="${resin.home}/php/admin"> | + | ##:<pre><http address="*" port="80"/></pre> |
− | #: <!-- | + | ## Allow for wildcard virtual hosts by changing the default <host> tag to: |
− | #: - Administration application /resin-admin | + | ##:<pre> |
− | #: --> | + | ##: |
− | #: <prologue> | + | ##:<host host-name="example.com"> |
− | #: <resin:set var="resin_admin_external" value="false"/> | + | ##: <host-alias-regexp>(.*)\.example\.com</host-alias-regexp> |
− | #: <resin:set var="resin_admin_insecure" value="true"/> | + | ##: |
− | #: </prologue> | + | ##: <web-app id="/" root-directory="/var/www/hosts/default/webapps/ROOT"/> |
− | #: </web-app> | + | ##: |
− | #:</host></pre> | + | ##: <web-app id="/resin-admin" root-directory="${resin.home}/php/admin"> |
+ | ##: <!-- | ||
+ | ##: - Administration application /resin-admin | ||
+ | ##: --> | ||
+ | ##: <prologue> | ||
+ | ##: <resin:set var="resin_admin_external" value="false"/> | ||
+ | ##: <resin:set var="resin_admin_insecure" value="true"/> | ||
+ | ##: </prologue> | ||
+ | ##: </web-app> | ||
+ | ##:</host></pre> | ||
+ | ## Make Resin run as user "resin" by uncommenting the following lines: | ||
+ | ##:<pre> | ||
+ | ##:<user-name>resin</user-name> | ||
+ | ##:<group-name>resin</group-name></pre> | ||
+ | ## Remove the following lines from <host-default> | ||
+ | ##:<pre> | ||
+ | ##:<!-- creates the webapps directory for .war expansion --> | ||
+ | ##:<web-app-deploy path="webapps"/></pre> | ||
# Create a virtual host directory for your domain:<pre>/var/www/hosts/default/webapps/ROOT</pre> | # Create a virtual host directory for your domain:<pre>/var/www/hosts/default/webapps/ROOT</pre> | ||
# Unzip WordPress Mu and copy all files and directories to /var/www/hosts/default/webapps/ROOT | # Unzip WordPress Mu and copy all files and directories to /var/www/hosts/default/webapps/ROOT | ||
Line 44: | Line 68: | ||
#:<?xml version="1.0"?> | #:<?xml version="1.0"?> | ||
#:<web-app xmlns="http://caucho.com/ns/resin"> | #:<web-app xmlns="http://caucho.com/ns/resin"> | ||
+ | #: <servlet-mapping url-pattern="*.php" | ||
+ | #: servlet-class="com.caucho.quercus.servlet.QuercusServlet"> | ||
+ | #: <init> | ||
+ | #: <php-ini> | ||
+ | #: <display_errors>Off</display_errors> | ||
+ | #: </php-ini> | ||
+ | #: </init> | ||
+ | #: </servlet-mapping> | ||
+ | #: | ||
#: <welcome-file-list> | #: <welcome-file-list> | ||
#: <welcome-file>index.php</welcome-file> | #: <welcome-file>index.php</welcome-file> | ||
#: </welcome-file-list> | #: </welcome-file-list> | ||
+ | #: | ||
+ | #: <!-- rewrite-dispatch replaces the mod_rewrite rules included with WordPress Mu --> | ||
#: <rewrite-dispatch> | #: <rewrite-dispatch> | ||
#: <!-- uploaded files --> | #: <!-- uploaded files --> | ||
Line 67: | Line 102: | ||
#: </rewrite-dispatch> | #: </rewrite-dispatch> | ||
#:</web-app></pre> | #:</web-app></pre> | ||
− | # | + | # As root, run <pre>java -jar /usr/local/share/resin-3.2.0/lib/resin.jar -conf /etc/resin/resin.xml start</pre> |
# Browse to your host and set up WordPress Mu according to the online directions | # Browse to your host and set up WordPress Mu according to the online directions |
Latest revision as of 22:51, 8 July 2008
[edit] Running Wordpress Mu 1.5.1 on Resin 3.2.0
WordPress Mu is a multi-user version of WordPress that allows for several different blogs to be maintained side-by-side in a single deployment. It also offers management capabilities for handling the different blogs. Blogs can appear as different virtual hosts or in sub-paths. This page shows how to install WordPress Mu using virtual hosts.
[edit] Requirements
- MySQL server
- Java 1.5 or higher
- Access to your DNS server
[edit] Full installation
- Add a wildcard entry to your DNS record (usually of the form *.example.com, details here)
- Download WordPress Mu 1.5.1 from http://mu.wordpress.org/download/
- Download Resin Pro 3.2.0 from http://www.caucho.com/download
Do the following steps as root, either logging in as root or using sudo.
- Unzip Resin Pro 3.2.0 in /usr/local/share
- Add the user "resin":
useradd resin
- Change the ownership of the Resin Pro directory to "resin":
chown -R resin:resin /usr/local/share/resin-pro-3.2.0
- Create the directory /var/www/hosts
- Change the ownership of the directory to "resin":
chown resin:resin /var/www/hosts
- Copy /usr/local/share/resin-3.2.0/conf/resin.xml to /etc/resin/resin.xml
- Change the ownership of /etc/resin/resin.xml to "resin":
chown resin:resin /etc/resin/resin.xml
Do the following as user "resin", unless otherwise specified
- Run the following within /usr/local/share/resin-pro-3.2.0:
./configure; make; make install
- Place your Resin license in /usr/local/share/resin-pro-3.2.0/licenses
- Edit /etc/resin/resin.xml:
- Change the line
<http address="*" port="8080"/>
- to
<http address="*" port="80"/>
- Allow for wildcard virtual hosts by changing the default <host> tag to:
- <host host-name="example.com">
- <host-alias-regexp>(.*)\.example\.com</host-alias-regexp>
- <web-app id="/" root-directory="/var/www/hosts/default/webapps/ROOT"/>
- <web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
- <!--
- - Administration application /resin-admin
- -->
- <prologue>
- <resin:set var="resin_admin_external" value="false"/>
- <resin:set var="resin_admin_insecure" value="true"/>
- </prologue>
- </web-app>
- </host>
- Make Resin run as user "resin" by uncommenting the following lines:
- <user-name>resin</user-name>
- <group-name>resin</group-name>
- Remove the following lines from <host-default>
- <!-- creates the webapps directory for .war expansion -->
- <web-app-deploy path="webapps"/>
- Change the line
- Create a virtual host directory for your domain:
/var/www/hosts/default/webapps/ROOT
- Unzip WordPress Mu and copy all files and directories to /var/www/hosts/default/webapps/ROOT
- Create the WordPress database:
mysql -u root
mysql> CREATE DATABASE wordpress;
- Create the directory /var/www/hosts/default/webapps/ROOT/WEB-INF/lib
- Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
- Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in /var/www/hosts/blog.example.com/webapps/ROOT/WEB-INF/lib
- Create the file /var/www/hosts/default/webapps/ROOT/WEB-INF/resin-web.xml:
- <?xml version="1.0"?>
- <web-app xmlns="http://caucho.com/ns/resin">
- <servlet-mapping url-pattern="*.php"
- servlet-class="com.caucho.quercus.servlet.QuercusServlet">
- <init>
- <php-ini>
- <display_errors>Off</display_errors>
- </php-ini>
- </init>
- </servlet-mapping>
- <welcome-file-list>
- <welcome-file>index.php</welcome-file>
- </welcome-file-list>
- <!-- rewrite-dispatch replaces the mod_rewrite rules included with WordPress Mu -->
- <rewrite-dispatch>
- <!-- uploaded files -->
- <forward full-url-regexp="^(.*/)?files/$"
- target="index.php"/>
- <forward full-url-regexp="^(.*/)?files/(.*)"
- target="wp-content/blogs.php?file=$2"/>
- <!-- pass through requests that go to real files -->
- <dispatch>
- <when exists="$0"/>
- </dispatch>
- <forward full-url-regexp="^([_0-9a-zA-Z-]+/)?(wp-.*)" target="$2"/>
- <forward full-url-regexp="^([_0-9a-zA-Z-]+/)?(.*\.php)$" target="$2"/>
- <!-- send all other requests to index.php -->
- <forward target="/index.php"/>
- </rewrite-dispatch>
- </web-app>
- As root, run
java -jar /usr/local/share/resin-3.2.0/lib/resin.jar -conf /etc/resin/resin.xml start
- Browse to your host and set up WordPress Mu according to the online directions