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 am setting up apache on my windows 2008 server at my home. It will serve 2 functions.

  1. Subversion hosting to allow me and some others to manage company documents with version control
  2. Local website hosting for web development. Will need to run several websites since I generally work on more then one site at a time.

Heres what I have done so far.

  • I set up subversion and apache 2.2 using some walk troughs.
  • I changed the default port to 1337. (im a nerd)
  • Using dyndns.com I created a domain to forward to my home ip which is dynamic. ( company.gotdns.org)
  • I then went into my DNS for my company.com and added a record to point repo.company.com to company.gotdns.org
  • At this point people who need access to my file repository can access by going to repo.company.com/repo which is good so far.

My question comes on the next step, setting up virtual hosts with apache. Ideally I would like to have my local website be viewable by some others in the company from their homes. So, say I am working on site1, I would like to have them be able to view this by going site1.roeland.bythepixel.com. At the same time, I would like to have site10.wouter.bythepixel.com go to his local setup for site10.

What I have done for this:

  • I went into my DNS for company.com and added a record to point roeland.company.com to company.gotdns.org (which translates to my ip).
  • I added code to my httpd-vhosts.conf (listed at bottom)
  • I added code to my host file (listed at bottom)

Hah, so of course this doenst work as excepted.. going to site1.roeland.bythepixel.com doesnt bring up my test1 site. Could anyone point me where I may be going wrong? Thanks!

hosts:

127.0.0.1       localhost
127.0.0.1       sensenich.roeland.bythepixel.com
::1             localhost

httpd-vhosts.conf:

<VirtualHost *:80>
    ServerAdmin roeland@bythepixel.com
    DocumentRoot "F:/Current Projects/sensenich.com"
    ServerName sensenich.roeland.bythepixel.com
    ErrorLog "logs/sensenich.roeland.bythepixel.com-error.log"
    CustomLog "logs/sensenich.roeland.bythepixel.com-access.log" common
</VirtualHost>
share|improve this question

closed as off topic by MDMarra, sysadmin1138 Nov 15 '12 at 12:38

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
+1 - I wish everyone gave this much relevant detail in their questions –  Mark Henderson Mar 30 '10 at 21:06
    
Home-server setup is now off-topic per the FAQ. –  sysadmin1138 Nov 15 '12 at 12:38

2 Answers 2

I am in no way an expert in this but in my vhosts.conf (on windows) the path to documentroot looks a bit different;

<VirtualHost *:80>  
    DocumentRoot /HOMEPAGES/duppen.nl  
    ServerName www.duppen.nl  
    ServerAlias duppen.nl  
    ErrorLog logs/duppen.nl-error.log  
    CustomLog logs/duppen.nl-access.log common  
</VirtualHost>  

then in the httpd.conf the following line is added/modified:
DocumentRoot "W:/HOMEPAGES"

share|improve this answer

I went into my DNS for company.com and added a record to point roeland.company.com to company.gotdns.org (which translates to my ip).

You've got that mostly right. If you want site1.roeland.company.com to be forwarded, you need to add a wildcard DNS entry, for *.roeland.company.com - otherwise, ONLY roeland.company.com will resolve.

share|improve this answer

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