Skip to content

Instantly share code, notes, and snippets.

@rilindo
Created October 11, 2015 02:08
Show Gist options
  • Save rilindo/29b4a108e27db730a479 to your computer and use it in GitHub Desktop.
Save rilindo/29b4a108e27db730a479 to your computer and use it in GitHub Desktop.
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout `pwd`/apache.key -out `pwd`/apache.crt
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
ServerAlias test
DocumentRoot /var/www/html
ServerName test.monzell.com
</VirtualHost>
<VirtualHost *:443>
ServerAlias Test
DocumentRoot /var/www/html
ServerName test.monzell.com
SSLEngine on
SSLCertificateFile /etc/httpd/ssl-certs/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl-certs/apache.key
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment