On CentOS 7 Linux I have successfully followed the guide Configuring Jetty for FastCGI.
However the $JETTY_BASE/webapps/jetty-wordpress.xml
file in the guide serves a single Wordpress installation located in /var/www/wordpress
:
<New id="root" class="java.lang.String">
<Arg>/var/www/wordpress</Arg>
</New>
<Set name="contextPath">/</Set>
<Set name="resourceBase"><Ref refid="root" /></Set>
<Set name="welcomeFiles">
<Array type="string"><Item>index.php</Item></Array>
</Set>
while I have several virtual hosts, each with Wordpress installed in:
- /var/www/wordpress1 (www.site1.com)
- /var/www/wordpress2 (www.site2.com)
- /var/www/wordpress3 (www.site3.com)
Until now I was using Apache with the following httpd.conf
(using localhost as the IP address, because Apache/Jetty are behind HAProxy):
<VirtualHost 127.0.0.1:8080>
DocumentRoot /var/www/wordpress1
ServerName site1.com
ServerAlias *.site1.com
</VirtualHost>
<VirtualHost 127.0.0.1:8080>
DocumentRoot /var/www/wordpress2
ServerName site2.com
ServerAlias *.site2.com
</VirtualHost>
<VirtualHost 127.0.0.1:8080>
DocumentRoot /var/www/wordpress1
ServerName site3.com
ServerAlias *.site3.com
</VirtualHost>
How to translate the above Apache-config to Jetty IoC XML format?