Generating Your Own Security Certificates For Use With Apache/HTTPS - Configure Apache
(Page 6 of 7 )
The desired directories, files and directives should be set in Apache's configuration file.
# vi /usr/local/apache/conf/httpd.conf
ServerType standalone ServerRoot /usr/local/apache
<IfDefine SSL> Listen 80 Listen 443 </IfDefine>
User nobody Group nogroup ServerAdmin mail@example.com ServerName www.example.com
DocumentRoot /mnt/hdd/web LoadModule php4_module libexec/libphp4.so
<IfModule mod_dir.c> DirectoryIndex index.php index.html </IfModule>
<IfModule mod_mime.c> AddType application/x-httpd-php .php </IfModule>
<Directory "/mnt/hdd/web"> Options Indexes FollowSymLinks MultViews AllowOverride None Order allow,deny Allow from all </Directory>
<IfDefine SSL> NameVirtualHost *:443 <VirtualHost *:443> DocumentRoot /mnt/hdd/webssl
SSLEngine on SSLCertificateFile \ /usr/local/apache/conf/ssl.crt/server.crt SSLCertificateKeyFile \ /usr/local/apache/conf/ssl.key/server.key
<Directory "/mnt/hdd/webssl"> Options Indexes MultViews AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> </IfDefine> |
The default configuration file provides a good starting point. Specific points of interest are the ServerType, ServerRoot, ServerAdmin, ServerName, DocumentRoot, LoadModule, SSLEngine, SSLCertificateFile and SSLCertificateKeyFile directives.
Be sure that the SSLCertificateFile points to the location of the server's certificate and the SSLCertificateKeyFile points to the location of the server's encryption key.
There may be other directives that you wish to change.
Next: Start/Stop Apache >>
More Server Administration Articles
More By bluephoenix