Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Apple OS X Set up a production/testing server at home

  • Set up a production/testing server at home

    Posted by Phil Incorvia on January 5, 2007 at 6:17 am

    Hi,

    I’m trying to set up a dedicated computer to act as a production web server to test sites I’m building at home.

    I have set up a mac running OS X and created Virtual Hosts for each site I’m working on successfully on a single machine. For example, if the actual site is “www.somesite.com” I can enter the address “www.somesite.dev” and have it load the local version in my browser.

    What I’d like to do is be able to access the sites on my local testing server from other computers on my network. Essentially, have a local web server that serves the sites in production. The question is how do I get the browser (on a different local computer) to point to the actual internet site for “somesite.com” and the production server’s verion with “somesite.dev” (or whatever I do to differentiate it).

    Is this clear? Is this possible? Some local DNS trickery?

    Any help would be appreciated. HTML/CSS, no problem. Unix, Apache, PHP… just a bit, more every day.

    Thanks!

    Phil

    Curtis Thompson replied 19 years, 4 months ago 2 Members · 3 Replies
  • 3 Replies
  • Curtis Thompson

    January 5, 2007 at 11:37 am

    hello…

    is there a reason you need to have domains? you could use the box ip address and ports and then all the boxes on the network could see the sites automatically without having to modify name records..

    like say your apple server is 10.11.12.1 – you could have virtual hosts running at 10.11.12.1:8000, 10.11.12.1:8001, etc. etc…

    that’s pretty easy to set up in apache. as long as you don’t have a firewall around the server, that traffic (and any port-specific web requests) will automatically get to the box and then it’s just a matter of telling apache to listen on that port as well as the default 80 port…

    thoughts?

    sitruc

  • Phil Incorvia

    January 5, 2007 at 5:11 pm

    Okay, I *think* I get it…

    Set up a virtual host for “somesite.com” with a port (say 8000). Would that look like this in my
    httpd.conf file?

    NameVirtualHost *:8000


    DocumentRoot /Volumes/mydrive/mydocs/somesite.com
    ServerName somesite.com

    If that’s right, to access the site, do I just type in the server’s address and the proper port number to get to the site?

    If all this is what you meant, I think I get it. I was looking for a way to not have to remember port numbers, which is why I’ve gone with the .dev suffix for my same-machine test sites.

    Thanks, Curts. You’re always incredibly helpful!

    Phil

  • Curtis Thompson

    January 5, 2007 at 5:20 pm

    hello…

    ya – so let’s say you were setting up a virtual host on 8080 – you open up apache’s conf file and look for the “Listen” directive – it should already be set up to listen to port 80 (default web port) and maybe 443 (ssl) – then add yours:

    Listen 80
    Listen 8080

    then add a virtual host:

    <VirtualHost [YOUR_IP]:8080>
    </VirtualHost>

    and then you can populate that with any variety of options – doc root, custom logs, etc. etc…then restart apache and you should be good to go! if i’ve glossed over anything, there’s docs here:

    https://httpd.apache.org/docs/1.3/vhosts/examples.html

    i think it’s easier than trying to run a separate (and i don’t mean this negatively) “fake” dns system inside your network…you could always make a root page for the default server that had links to each virtual host you had to help keep track of them…

    hope that helps!

    sitruc

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy