Download Zend Server Cluster Manager Reference Manual

Transcript
Zend Server Cluster Manager Reference Manual
Working with Zend Download Server
This component is not relevant for Windows and IBM i Servers.
The Zend Download Server (ZDS) can be used to increase your Apache Web server's capacity by
automatically taking over static downloads. This releases Apache processes to handle more dynamic
requests.
Files can be sent through the ZDS in two ways:
1. Automatically - By configuring Apache to pass specific file types to PHP: For example, images,
PDF files or any other relatively large static files. When the ZDS is loaded and configured, PHP
passes the request to the ZDS, which takes over sending the file to the user.
2. Manually - By calling the Zend Download Server API functions from within your PHP script. This
is useful for situations where you require some code or logic to run before allowing a download,
such as authenticating users before permitting them to download.
Configuring Zend Download Server to Automatically Handle Files
This procedure describes how to configure your environment to handle certain file types with the ZDS.
Although transparent to end users, this action is expected to increase server capacity.
To set up ZDS to automatically handle specific file types:
1. Locate the Apache configuration file that contains the PHP handler configuration by
searching for the line starting with "AddHandler php5-script" (you can do this using grep
or similar tools). This line defines the file extensions that are passed to PHP.
2. Add the extensions of the file types you want ZDS to handle at the end of this line.
3. Make sure that the same file extension is listed in the ZDS MIME type configuration file
located in <install_path>/etc/zend_mime_types.ini. If not, add it and make sure to define
the correct MIME type for it. The configured MIME type is sent as the value of the
"Content-type" HTTP response header, which (according to the browser's individual
settings) determines the browser's behavior when it receives the file.
4. Save your files and restart the Apache server.
All the defined files types are now handled by the ZDS (as long as this component is set to 'On' in the
Administration Interface).
146