Changes to Your Apache During Deployment Actions

When performing a deployment action, such as deploying, redeploying, updating, rolling back or removing an application, Zend Server restarts and performs certain changes to your Apache. The Web server configuration is modified to create virtual hosts and aliases for deployed applications. To make the modifications simple and maintainable, the Zend Server configuration is small separate files which are hooked into Apache.

Zend Server installation inserts an 'include' in two places:

  • Inside the default virtual host section (the first defined virtual host is assumed to be the default):

    Include "<ZEND_DIR>/etc/sites.d/zend-default-vhost.conf"
    The content of the above file should be:

    Include "<ZEND_DIR>/etc/sites.d/http/__default__/0/*.conf" 
    <Directory "<ZEND_DIR>/<data_dir>/apps/__default__/0"> 
    # ...application directory settings 
    </Directory>
  • At the end of the Apache configuration:

    Include <ZEND_DIR>/etc/sites.d/globals-*.conf
    Include <ZEND_DIR>/etc/sites.d/vhost_*.conf

For each deployed application, Zend Server creates the following files:

  • The globals file holds definitions such as NameVirtualHost *:<port> for each port that actually has virtual hosts.
  • Each virtual host is defined in <ZEND_DIR>/etc/sites.d/vhost_<host>_<port>.conf
  • Each virtual host definition includes aliases from the directory <ZEND_DIR>/etc/sites.d/http/<host>/port/
  • Each alias is defined in a file named <order_number>-<alias_name>/conf

The Web Server Restart

When Zend Server restarts your Web server, current requests are aborted and lost. The sessions are kept in the same state as before the restart, and all information that was modified in the session during the ongoing request is lost. After the restart begins, incoming requests are queued until the restart completes and are then processed.

Hot Update Mode: When updating an application in "Hot Update" mode (see deployment settings reference page), there is no need to restart the web server, and it will continue to serve requests while resources are updated. The web server will only restart if an earlier deployment or update of the same application was made in "Cold Update" mode (see deployment settings reference page).