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'm really lost and my native language is not English so It's difficult to understand some of the complicated Apache Doc pages.

I've set up a Apache 2 webserver on an old Macintosh (Mac OS X 10.4.11, but also on a GNU/Linux box with same config files, but of course not at the same time ;) ).

The DocumentRoot is /Users/enrique/Sites, I know it's not the best but it works and I don't have permissions error when I mount the shared folder on other computers in my LAN.

I set up a free domain at co.cc let's say it is mysuperdomain.co.cc

I've also set up a ZoneEdit DNS account. I made a new zone called "mysuperdomain.co.cc" and then using an app called DNSUpdate with my Zoneedit data to update my dynamic IP (it usually changes twice a month with my ISP). It works fine and I can use ssh, VNC, FTP and of course my apache webserver from anywhere. I tried to VNC the Mac from a computer shop in Germany (I live in Spain) and I was great... and It saved me as I could recover some documents...

I usually ssh my server and edit the config file from there, or I use webmin if I'm in a Windows box and I don't have a SSH client.

Well, this is the problem: I had configured a virtualhost by hand first, and then again with webmin (maybe I was missing something) with the address doc.mysuperdomain.co.cc and DocumentRoot /Users/enrique/Sites/data/doc because I want to take it apart from my other folders.

Well, If I type doc.mysuperdomain.co.cc on my browser it takes me to the default Index page.

Why doesn't it take me to the right folder?

I don't know what to do. I think buying a "full" domain is now a bit expensive (and that doc folder is for educational purposes). With a, say, .net or .com personal domain will I be able to use subdomains with my free zoneedit account?

If someone can save me I'll be the happiest man on Earth...

Update:

I say I'm lost. This is what I have in my httpd.conf

NameVirtualHost mysuperdomain.co.cc:80

<VirtualHost doc.mysuperdomain.co.cc:80>
DocumentRoot /Users/enrique/Sites/doc
ServerName mysuperdomain.co.cc
</VirtualHost>

I'm not using an external httpd-vhosts.conf, shall I use it?

I had tried putting another Vhost with the main domain (mysuperdomain.co.cc) pointing at the documentroot (Users/enrique/Sites), with no luck.

I think it's something I typed wrong (Apache doc is quite difficult to understand, and some pages are not updated in the spanish version...)... but maybe using a free co.cc domain is the problem. I'll cross my fingers and wait that is a configuration error.

share|improve this question

1 Answer 1

Is your Apache configuration for the doc.mysuperdomain.co.cc using the ServerName directive? ServerName is used to map the host name to the virtual host.

Also, if you are using httpd-vhosts.conf, make sure it is enabled in your primary httpd.conf file.

share|improve this answer

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.