Cannot Add SSL Vhost Using Zend Server Admin UI


This article is also available in our new Knowledge Base: Cannot Add SSL Vhost Using Zend Server Admin UI

Applies To

Zend Server UI

Zend Server 9.0.1



When creating a new virtual host with SSL support using the Zend Server UI, you might get an error such as:

AH00526: Syntax error on line 20 of /usr/local/zend/etc/sites.d/vhost_http_example.com_443.conf:
SSLCertificateFile takes one argument, SSL Server Certificate file ('/path/to/file' - PEM or DER encoded)


Zend Server UI fails to replace SSL Certificate paths inside the template variables, which causes some problems such as failure to add new virtual host, or even failure to start Apache due to syntax errors in its configuration (i.e. - failing to locate the certification files). If you examine the virtual host's configuration file after the wizard completes, you see blank SSLCertificate* values as shown below:

<VirtualHost *:443>
SSLEngine on
SSLCertificateFile ""
SSLCertificateKeyFile ""
# SSLCertificateChainFile ""

Note: In Linux environment, the virtual host configuration file is located in the directory /usr/local/zend/etc/sites.d and in Windows, it is located in the folder <ZS_INSTALL_DIR>\etc\sites.d.


Manually inserting absolute paths to SSL certificate and key in the vhost template by editing it will eliminate the problem from happening

1. First, delete the problematic SSL virtual host(s), if any. Refer to Removing a Virtual Host section in the document: Working with Virtual Hosts

2. Clear your browser cache / cookies.

3. In the Zend Server UI, go to Applications | Virtual Hosts | click on "Add virtual host" to open the Virtual Host wizard.

4. Follow the first two steps as directed, and on the third step of the Add Virtual Host wizard, click on Edit the virtual host configuration template as shown in the following image.

5. In the Virtual Host template, replace the variables ${certificate_file} and ${certificate_key_file} with their respective absolute paths as shown in the following image:


Note: in Windows environment, the paths should be in Windows file path format, for example, C:\Program Files\Zend\Apache24\

6. Click Next and then click Finish, and when prompted, click on the Restart button in the upper right hand corner to restart Zend Server.

This should properly configure the SSL certificate and key paths in your virtual host configuration and the virtual host should work as expected.


We have an open bug and a fix will be included in the next version, so manual steps above will not be needed to creating a vhost with SSL support.