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

I've currently setup

  • ubuntu lucid
  • lamp
  • redmine

I'm testing out on free-tier AWS cloud with dyndns.org dyndns pro with my own domain.com mapped to the public address of AWS cloud E2C instance. This is working when I go www.domain.com/redmine.

However, I want to mapped it as a sub domain redmine.domain.com. What do I need to do in dyndns.org (I tried adding cname redmine.domain.com to e2c ip but it still doesn't work)

What else do i need to configure or set?

Below is apache configurations

/etc/apache2/sites-available/redmine 



<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
        ServerName redmine.domain.com

        RewriteEngine on
        RewriteRule   ^/$  /redmine  [R]

        <Directory /var/www/redmine>
                RailsBaseURI /redmine
                PassengerResolveSymlinksInDocumentRoot on
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
</VirtualHost>

Cheers

share|improve this question

migrated from stackoverflow.com Oct 7 '11 at 17:24

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 0 down vote accepted

Steps i took and it partially worked:

In dyndns portal,

Under my services -> DNS for xxx.com Click on "Add alias (CNAME)" Key in "redmine.xxx.com" Alias to "xxx.com"

Wait for a few hours to propagate the domain name.

Now try : redmine.xxx.com

Yes it worked.. But PARTIALLY because it got redirected to redmine.xxx.com/redmine

I do not want the /redmine to appear... How do i do it??

Here's my update /etc/apache2/sites-available/redmine


        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
        ServerName redmine.xxx.com

        #RewriteEngine on
        #RewriteRule   ^/$  /redmine  [R]
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^redmine\.xxx\.com
        RewriteCond %{REQUEST_URI} !/redmine/
        RewriteRule ^(.*)$ /redmine$1 [R=301,L]

        
                RailsBaseURI /redmine
                PassengerResolveSymlinksInDocumentRoot on
        

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn


share|improve this answer

You shouldn't need all the rewrite stuff you have in your virtual host. The 'DocumentRoot' can be set do use /redmine directory directly and then the 'RailsBaseURI' will be /

Simplify it to be...

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/redmine
    ServerName redmine.xxx.com


            RailsBaseURI /
            PassengerResolveSymlinksInDocumentRoot on


    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
share|improve this answer
    
this is perfect and simple. Thanks!!! –  flyclassic Oct 11 '11 at 1:28

Your Answer

 
discard

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.