Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an EC2 instance running Redmine and myPHPadmin at https://myElasticIP/redmine and https://myElasticIP/phpmyadmin.

I have a domain name registered with namecheap: myDomain.us

Using Route 53, I have customized the DNS of myDomain.us (through the namecheap interface) to use the delegate NS's in Route 53, so going to myDomain.us will automatically reference myelasticIP instead.

How do I get it so that going to redmine.myDomain.us references https://myElasticIP/redmine and myphpadmin.myDomain.us references https://myElasticIP/myphpadmin? (without using URL Frames or URL redirect...I want x.myDomain.us to remain in the address bar)

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can't do that with DNS alone - you'll need to get some HTTP involved somewhere.

I'd just create two vhosts, one for redmine.myDomain.us and one for myphpadmin.myDomain.us, and just point their DocumentRoot to the correct location on your filesystem.

For instance, if this is your vhost for myDomain.us:

<VirtualHost *:80>
    ServerName myDomain.us
    DocumentRoot /var/www

Then you'd create the following additional vhosts:

<VirtualHost *:80>
    ServerName redmine.myDomain.us
    DocumentRoot /var/www/redmine


<VirtualHost *:80>
    ServerName myphpadmin.myDomain.us
    DocumentRoot /var/www/myphpadmin

Additionally, you'll need to create two new DNS names for the two new vhosts. DNS CNAME records should be created redmine.myDomain.us and myphpadmin.myDomain.us, both pointing to myDomain.us.

share|improve this answer
DNS CNAME records should be created redmine.myDomain.us and myphpadmin.myDomain.us, both pointing to myDomain.us. Just to verify, should they point to the elastic IP or the domain name? –  David Kaczynski Nov 11 '12 at 3:07
They should point to the domain name. –  EEAA Nov 11 '12 at 3:10
This is helping, but I still have an issue. I am using the rewrite mod to force port 80 connections to be rewritten to https, RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}/redmine [R]. This is resulting in requests for http://redmine.myDomain.us to go to https://redmine.myDomain.us/redmine. Any suggestions? –  David Kaczynski Nov 11 '12 at 3:21
Please post that as a separate question. –  EEAA Nov 11 '12 at 3:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.