I want to have a subdomain point to another computer on my network (technically it's an Ubuntu VBox on same server, but with different IP.), but lets just say I started apache on another computer on the home network so that it serves a subdomain name of the FQDN.

Router is set up correctly opening incoming ports to each specific IP, so not sure why when I access the subdomain via the web it defaults to main site. Something is being either re-directed incorrectly or just not able to get through to the computer on local net.

Main server of the FQDN is Mac OS X Server (for now), could fully convert it over to Ubuntu...But I want to keep the mail service and jabberd service going on the Mac Server side. Maybe setting the subdomain name as an NS on my dyndns.org account...??



This has been solved for now...

My problem was that I am running a MAC OS X Server GUI (gawd!). Anyway to get my subdomain to point to another computer on the LAN, in this case an Ubuntu virtual box running on the same MAC server I needed to use a reverse proxy in the virtual hosts .conf file. Problem I thought I was going to have that any time I make changes via the MAC GUI it would overwrite the file to default values. So I tested it and for some reason it didn't and here is what I replaced the default values with:

VirtualHost *:80 (Add the <> before and after, for some reason it won't print on this forum, so it should be VirtualHost *:80 btwn the <>)

    ServerName subdomain.domain.info
    ProxyPreserveHost On
    ProxyRequests off
    ProxyPass /
    ProxyPassReverse /

(here you should add the /VirtualHost preceded by < and > after).

And viola it pointed to the Ubuntu VBox and didn't interrupt pointing to the correct directory of the FQDN. I got purposely vague tips from a gentleman on the MAC OS X Server forums that pointed me in the right direction. So there you have it, if you have a Mac Box Server and want to tinker with a VBox and send a subdomain to it you have to manually add the subdomain to your MAC GUI then edit the default created file in /Library/Server/Web/Config/apache2/sites 0000_any_80_yoursubdomain.domain.com and delete everything and replace it with above directive, obviously change the IP number to your chosen number of the box you want to point to.

Having said all that, I had pre-configured DNS on the Ubuntu box following Chapter 8 instructions of the Ubuntuserverguide.pdf Domain Name Service (DNS). Not sure if it had any effect, but I will post back when I fire up another blank box and not configure the DNS entries and see if it still works with default values.

UPDATE: fired up a new VM Box didn't configure DNS services and well, still works, so DNS can largely be ignored I guess if there is another server on the LAN dealing with all that.

One thing I did notice though that was pretty cool, when I shut down the VM Box and you try to access the domain hosted on it the MAC Server puts a nice kind message up saying "Service temporarily unavailable due to maintenance" which is kind of cool, means that the server exists no matter what. How interesting is that?

Update: Created a workaround so as to be able to ftp into my subdomain. Basically, enabled FTP services on the MAC GUI server software which defaults to whatever directory you assign no matter what address you us, i.e. subdomain.FQDN.com or FQDN.com. Kind of boring that the MAC doesn't provide multiple FTP login's to different directories for each subdomain/domain served.

Anyway... sudo apt-get install samba and configure your share folder and you can access it from Mac finder and mount it, then tell the MAC Server FTP to use that mounted directory. Not ideal, but it works especially when I launch Dreamweaver and use actual subdomain ftp address it takes me to / and not /var/www via local connect using vsftpd. I can now access it remotely, which is always handy and it won't go past the / which translates to /var/www on the VM.

One other note about this set up, the users on the MAC server can't access the ftp site unless specifically added to the smb.conf file on the VM... very cool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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