I installed redmine just a few minutes (or hours?) ago and it works fine at my root domain “mydomain.com”. But this is not what I want. What I want is my root domain pointing to some public stuff and “redmine.mydomain.com” pointing to my redmine-Project.
Here is my apache2.conf
-file:
LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
Include mods-enabled/*.load
Include mods-enabled/*.conf
Include httpd.conf
Include ports.conf
Include conf.d/
Include sites-enabled/
ServerName *.mydomain.com
<VirtualHost *:80>
ServerAdmin my.mail@mydomain.com
DocumentRoot /var/www/websvn/
ServerName svn.mydomain.com
<Location />
Options FollowSymLinks
AllowOverride None
order allow,deny
allow from all
AuthType Basic
AuthName "..."
Require valid-user
AuthUserFile /etc/apache2/dav_svn.passwd
</Location>
</VirtualHost>
<Location /websvn>
order allow,deny
allow from all
AuthType Basic
AuthName "..."
Require valid-user
AuthUserFile /etc/apache2/dav_svn.passwd
</Location>
And the 000-redmine
-file inside sites-enabled/
NameVirtualHost *:80
<VirtualHost *:80>
ServerName redmine.mydomain.com
ServerAlias redmine.mydomain.com
DocumentRoot /path/to/redmine/public
<Directory /path/to/redmine/public>
AllowOverride None
</Directory>
</VirtualHost>
A mods-enabled/passenger.load
:
LoadModule passenger_module /usr/local/lib/passenger/ext/apache2/mod_passenger.so
And a mods-enabled/passenger.conf
PassengerRoot /usr/local/lib/passenger
PassengerRuby /usr/bin/ruby1.8
PassengerDefaultUser www-data
The httpd.conf
is empty.
With this configuration I can access my redmine site via mydomain.com while redmine.mydomain.com does not even get resolved by my router.
What am I doing wrong? Pleas help me!
redmine.mydomain.com should be resolved to your vserver. the simplest thing you can do is to ask your vserver support to add a dns wildcard entry *.mydomain.com pointing to your vsever ip address so that anything.mydomain.com get resolved to your vps.
Check more discussion of this question.