3.4Using a web server in front of cmsWorks

Using a web server in front of cmsWorks has many advantages - as example you may use the full feature set of any modern web server with the generational functionalities of a full featured content management system in the backend and prosper of a fast delivery speed.

In principle the web server (here an example Apache configuration) accepts client requests and sends them (via mod_rewrite) to cmsWorks. Assuming the site's name is "www.mywebsite.com" and the cmsWorks live generator is running on port 8081 on the same machine as the Apache server, a pretty stripped down example configuration may look like this using the proxying of Apache:

<VirtualHost *:80>

ServerName www.mywebsite.com
DocumentRoot /var/www/html/mywebsite.com

ProxyRequests off
ProxyPassReverse / http://localhost:8081/

<Location />
ProxyPass http://localhost:8081/ retry=2
</Location>

ErrorLog /var/www/html/mywebsite.com/logs/error.log
CustomLog /var/www/html/mywebsite.com/logs/access.log combined

</VirtualHost>

Of course any other web server (such as nginx etc.) may do the same work.