First I describe how to install wordpress on a strato vServer. The set up process for the vServer is described here. Then I describe how to maintain different weblogs, one for each subdomain.
wordpress installation
After you setup your vServer as described here you log in your account using a ssh connection with ssh root@[servername], e.g. ssh root@vividbreeze.org. Your main server configuration data is located at /srv/www/vhosts/[domainname]. The content is located in the subdirectory /httpdocs. Make sure that all your domain and subdomains support cgi and php.
Download wordpress and upload it to /srv/www/vhosts/[domainname]/httpdocs/ with a ftp program. First you have to create a database using plesk or mysql at the command line. Now you can follow the wordpress installation process describes here. To comply with the multi-subdomain solution you should use www as the database prefix in your wp-config.php.
multi-subdomain installation
Eric Range published a brilliant and easy solution for a multi(sub)domain hosting of wordpress. You have to change your wp-config.php as described here. You only need one wordpress installation, including one plugin and one themes directory. Every subdomain gets it’s own prefix in the database. For each subdomain you have to go through the wordpress installation process; that’s all.
Before you start installing wordpress for your subdomains you have to edit the httpd.include file in /srv/www/vhosts/[domainname]/httpdocs/conf. Please notice that everytime you change or add new subdomains using plesk httpd.include is overwritten. You can edit the httpd.include file using an editor like vi or edit it on your local computer and upload it via ftp.
We want to achieve that if you invoke the url [sub].[domainname].[tld] the corresponding weblog is presented in your browser. Since there is only one wordpress installation, all the (sub)domains have to point to this installation. First we change the domain settings:
…
<VirtualHost aaa.bbb.ccc.ddd:80>
ServerName vividbreeze.org:80
ServerAlias www.vividbreeze.org
UseCanonicalName Off
SuexecUserGroup chris psacln
DocumentRoot /srv/www/vhosts/vividbreeze.org/httpdocs/wordpress
…
Then each subdomain also has to point to the wordpress directory:
<VirtualHost aaa.bbb.ccc.ddd:80>
ServerName chris.vividbreeze.org:80
SuexecUserGroup chris psacln
DocumentRoot /srv/www/vhosts/vividbreeze.org/httpdocs/wordpress
CustomLog /srv/www/vhosts/vividbreeze.org/statistics/logs/access_log plesklog
ErrorLog /srv/www/vhosts/vividbreeze.org/statistics/logs/error_log
ScriptAlias /cgi-bin/ /srv/www/vhosts/vividbreeze.org/subdomains/chris/cgi-bin/
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
<Directory /srv/www/vhosts/vividbreeze.org/httpdocs>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode on
php_admin_value open_basedir “/srv/www/vhosts/vividbreeze.org/httpdocs:/tmp”
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode on
php_admin_value open_basedir “/srv/www/vhosts/vividbreeze.org/httpdocs:/tmp”
</IfModule>
You could also change the global configuration: /etc/apache2/httpd.conf or /etc/apache2/default-server.conf.
Now call the URL [sub].[domainname].[tld] in your browser and you are guided through the wordpress installation process. That’s all - as easy as a-b-c.
When you’ve finished installing all subdomains I’ll recommend to set the install.php read-only using chmod 600 install.php. Of course you can also delete or rename this file.