configuration它在redmine.mydomain.com上响应的redmine

我安装了redmine几分钟(或几小时?)前,它在我的根域“mydomain.com”正常工作。 但是这不是我想要的。 我想要的是我的根域指向一些公共的东西,“redmine.mydomain.com”指向我的redmine-Project。 这是我的apache2.conf文件:

 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 [email protected] 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> 

000-redmine文件里面的网站启用/

 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> 

mods-enabled/passenger.load

 LoadModule passenger_module /usr/local/lib/passenger/ext/apache2/mod_passenger.so 

还有一个mods-enabled/passenger.conf

 PassengerRoot /usr/local/lib/passenger PassengerRuby /usr/bin/ruby1.8 PassengerDefaultUser www-data 

httpd.conf是空的。

有了这个configuration,我可以通过mydomain.com访问我的redmine站点,而redmine.mydomain.com甚至不能被我的路由器解决。

我究竟做错了什么? 请帮助我!

redmine.mydomain.com应该被parsing到你的虚拟主机。 你可以做的最简单的事情是要求你的虚拟服务器支持添加一个DNS通配符条目* .mydomain.com指向你的vsever IP地址,以便what.mydomain.com得到解决您的VPS。