Skip to content

Instantly share code, notes, and snippets.

@rduarte
Created December 6, 2010 13:24
Show Gist options
  • Save rduarte/730279 to your computer and use it in GitHub Desktop.
Save rduarte/730279 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerName gta-dev.nuntec.com.br
ServerAlias www.gta-dev.nuntec.com.br
DocumentRoot /var/apps/gta-dev/public
RailsEnv production
<Directory /var/apps/gta-dev/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerName gta-dev.nuntec.com.br
ServerAlias www.gta-dev.nuntec.com.br
DocumentRoot /var/apps/gta-dev/public
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
</VirtualHost>
openssl genrsa -out server.key 1024
openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt
chmod 400 server.key server.crt
mv server.crt /etc/ssl/certs/
mv server.key /etc/ssl/private/
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
NameVirtualHost *:443
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment