Skip to content

Instantly share code, notes, and snippets.

@gmassanek
Created March 13, 2012 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmassanek/2026304 to your computer and use it in GitHub Desktop.
Save gmassanek/2026304 to your computer and use it in GitHub Desktop.
Apache config to serve .com and redirect .org to .com
NameVirtualHost [ip_address]
<VirtualHost [ip_address]>
DocumentRoot /home/codemarks/www/codemarks/public
ServerName www.codemarks.com
ServerAlias codemarks.com
RailsEnv production
<Directory /home/codemarks/www/codemarks/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
<VirtualHost [ip_address]>
ServerName codemarks.org
ServerAlias www.codemarks.org
Redirect 301 / http://www.codemarks.com/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment