User Tools

Site Tools


Sidebar


guides:unix_admin:apache

Apache Web Server

getting rid of pass-phrase dialog at Apache startup

removing pass-phrase from rsa private key

setting up virtual hosts

Add the following to /etc/httpd/conf.d/httpd-vhosts.conf

<VirtualHost *:80>
    ServerAdmin webmaster@mail.smallco.com
    DocumentRoot /Users/michaelc/Documents/workspace/test/html
    ServerName www.test.local
    ErrorLog /Users/michaelc/Documents/workspace/test/logs/error_log
    TransferLog /Users/michaelc/Documents/workspace/test/logs/access_log
</VirtualHost>

setting up virtual ssl hosts

Multiple virtual ssl hosts is possible on the same server with multiple ip address. This is possible by using ip based routing. Each ssl virtualhost needs to have its own unique ip address.

Example config snippet of ssl.conf:

   <VirtualHost 67.228.198.70:443>
     ServerName www.rokradar.com
     DocumentRoot "/www/hosts/www.rokradar.com/html"
     SSLEngine On
     SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
     SSLCertificateKeyFile /etc/httpd/certs/rokradar/rokradar.key
     SSLCertificateFile /etc/httpd/certs/rokradar/www.rokradar.com.crt
     SSLCACertificateFile /etc/httpd/certs/gd/gd_bundle.crt
   </VirtualHost>

adding passwords by htpasswd

htpasswd -b password-file username password

Example:

htpasswd -b /var/www/.htpasswd admin dafs83d23
guides/unix_admin/apache.txt · Last modified: 2009/08/21 22:09 (external edit)