Page Title
Body If you need your application to respond to several different domain name there are two ways to accomplish this. In either case, you first need to add a DNS record so that the new domain or subdomain points to your server's IP address. h2. Using Capistrano If you're not using SSL, you can let Capistrano make the change for you. On your development computer, edit your app's deploy.rb and change this line: <pre><code># set :apache_server_aliases, %w{alias1 alias2}</pre></code> to this: <pre><code>set :apache_server_aliases, %w{ yournewdomain.com www.younewdomain.com}</pre></code> Add as many aliases as you need. Then re-write your apache configuration by running this: <pre><code>cap web:setup web:restart</code></pre> h2. Editing Apache Configuration If you are using SSL, the safest method is to edit the Apache configuration manually on the server: <pre><code>vi /etc/httpd/conf/apps/yourapp.conf</pre></code> Look for the two lines in the file that start with ServerAlias. Add your new domain(s) like this: <pre><code>ServerAlias yournewdomain.com www.yournewdomain.com</pre></code> Save the file, then restart Apache <pre><code>sudo /sbin/service httpd restart'</pre></code>
Make page private