# setting up apache2 + SSL on FreeBSD # a list of commands you can copy/paste! # @author Jamie Wilkinson <jamie@tramchase.com> # ganked from <http://www.freebsdmadeeasy.com/tutorials/web-server/apache-ssl-certs.php> # edit /etc/openssl.conf to set some nice defaults for location, org. name, etc. # important! change the default dir ./demoCA to /root/sslCA # setup cd ~root/ mkdir sslCA chmod 700 sslCA cd sslCA mkdir certs private newcerts echo 1000 > serial touch index.txt # generate certs openssl req -new -nodes -out eyebeam-req.pem -keyout private/eyebeam-key.pem -config /etc/ssl/openssl.cnf openssl req -new -x509 -days 3650 -extensions v3_ca -keyout private/cakey.pem -out cacert.pem -config /etc/ssl/openssl.cnf openssl ca -config /etc/ssl/openssl.cnf -out eyebeam-cert.pem -days 3650 -infiles eyebeam-req.pem # keep them somewhere handy mkdir /etc/ssl/crt mkdir /etc/ssl/key cp ~root/sslCA/eyebeam-cert.pem /etc/ssl/crt cp ~root/sslCA/private/eyebeam-key.pem /etc/ssl/key # add below to an ssl.conf that you include in your httpd.conf <VirtualHost *:443> ServerName colossus.eyebeam.org:443 SSLEngine on SSLCertificateFile /etc/ssl/crt/eyebeam-cert.pem SSLCertificateKeyFile /etc/ssl/key/eyebeam-key.pem DocumentRoot /www CustomLog /var/log/httpd-ssl-access.log combined ErrorLog /var/log/httpd-ssl-error.log </VirtualHost>
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Set up apache2+SSL on FreeBSD (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Getting a copy of a x509 cer... in apache ssl openssl certifcates
» Protect .svn directories usi... in apache sysadmin freebsd svn security subversion htaccess config linux cvs
» Suexec'ed PHP-FastCGI on Apa... in apache php fastcgi suexec
» Using pw to add a group and ... in sysadmin pw groupadd useradd passwd freebsd
» Upgrading a kernel in freebsd kernel installation cvsup stable
» Mixed example of mod_deflate... in apache mod_deflate httpd.conf
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails