0

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

flyclassic
  • 173
  • 3
  • 7

2 Answers2

0

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


flyclassic
  • 173
  • 3
  • 7
0

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
Paul Willis
  • 316
  • 1
  • 6