Category:Apache
Appearance
Resources[edit | edit source]
Securing Apache[edit | edit source]
in /etc/httpd/conf/httpd.conf
<Directory /var/www/html/noc> AuthType Basic AuthName "mattrude.com" AuthUserFile /etc/httpd/passwd/passwords Options FollowSymLinks Require valid-user </Directory> <Directory /var/www/html/mythweb> AuthType Basic AuthName "mattrude.com" AuthUserFile /etc/httpd/passwd/passwords Options FollowSymLinks Require valid-user </Directory>
and to make the /etc/httpd/passwd/passwords file run something like this
htpasswd -b /etc/httpd/passwd/passwords username password
Apache SSL setup[edit | edit source]
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[edit | edit source]
Redirect / https://mail.mattrude.com/
Pages in category "Apache"
The following 10 pages are in this category, out of 10 total.