Category:Apache

Resources

 * http://slacksite.com/apache/certificate.html

Securing Apache
in /etc/httpd/conf/httpd.conf  AuthType Basic AuthName "mattrude.com" AuthUserFile /etc/httpd/passwd/passwords Options FollowSymLinks Require valid-user   AuthType Basic AuthName "mattrude.com" AuthUserFile /etc/httpd/passwd/passwords Options FollowSymLinks Require valid-user  and to make the /etc/httpd/passwd/passwords file run something like this htpasswd -b /etc/httpd/passwd/passwords username password

Apache SSL setup
Add this to /etc/httpd/conf/httpd.conf or make sure you have /etc/httpd/conf.d/ssl.conf LoadModule ssl_module modules/mod_ssl.so To build the key run. cd /etc/pki/tls/private openssl genrsa 2048 > mail.mattrude.com.key cd ../certs openssl req -new -key ../private/mail.mattrude.com.key > mail.mattrude.com.csr openssl req -x509 -days 600 -key ../private/mail.mattrude.com.key -in mail.mattrude.com.csr > mail.mattrude.com.crt Then you need to modified the /etc/httpd/conf.d/ssl.conf vim /etc/httpd/conf.d/ssl.conf Around Line 112, change SSLCertificateFile & SSLCertificateKeyFile SSLCertificateFile /etc/pki/tls/certs/mail.mattrude.com.crt SSLCertificateKeyFile /etc/pki/tls/private/mail.mattrude.com.key Now restart Apache /sbin/service httpd restart

Redirect all web traffic to a different URL
Redirect / https://mail.mattrude.com/