Linux *NIX Based Testing (Web)Server

Discussion in 'Software' started by OneSeventeen, 1 Mar 2004.

  1. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    I'm laying out the plans (yes, I'm going to think it through this time!) for a testing server setup at home. I have an extra computer at home that I'd like to set up as a testing server for my websites, so I can test things out before uploading them to a more worthwhile webserver.

    My goal is to be able to set it up so I can either SSH into it with PuTTY, switch over to it and run off the machine, or simply FTP into it to upload files using something like Dreamweaver. (okay, not somthing 'like' dreamweaver, dreamweaver)

    I want to be able to call it something like testing.woventhorns.com, or possibly to have multiple websites on it and using multiple names, like [project_title].woventhorns.com.

    Right now my host provides all the DNS stuff, and they offer stuff where I can add [whatever].woventhorns.com and point it to an IP, but how can I make my LAMP know what to display based on the URL?

    Also, I'm going to post this later in Networking, but since it is a Linux box, are there any issues I'll have coming through a Linksys router? It is a 4 port switch/Broadband Router that I have my main rig and laptop hooked up to.

    The advice I'm looking for is what version of linux to use Please don't flame, I know it is really up to me, but I'm asking because you know what works, the search engines only know what the creators of the distro post. I'm hoping to not install a GUI (I need to learn sooner or later how to use this linux thing!), and to keep it as simple as possible, while being able to compile things (Mandrake 9.2 required me to install tons of libraries before anything would compile properly).
    I'm thinking of putting the entire LAMP on the same box, but if this is a bad idea let me know and I'll try to scrounge up enough parts for another server. (I have 3 free ports on my router)
     
  2. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    When you set up VHosts in apache, you setup a 'ServerName' directive. For example you might call a VHost webdev.woventhorns.com. When 'webtest.woventhorns.com' is requested in a browser, your Apache server will know that 'webtest....com' was requested, and so will serve that VHost.

    Obviously you just setup multiple VHosts to handle all posibilities of requests :)

    If your host gives you access to a DNS control panel for woventhorns.com, then its very simple to add the relevant CNames to your DNS records :) Typically they will offer up to 10, but some more and some less.

    Can't see that there'd be any problem as long as you have either the option to set a DMZ up or forward ports [both I would assume are possible :)]

    Distro advice: The way I see it is that if you install something like RedHat [Fedora], SuSe or ManRape then you really get to use linux and not 'learn' linux. Personally I find slackware strikes a nice balance between the two - it's ready to run whatever you want without the need for endless installs of libraries, but at the same time is *no where* near being bloated, like RH/MDr/SuSe etc.
    My best advice would be Slack or FreeBSD. And the CLi only is not as scary as it might seem :thumb:
     
  3. sk8o

    sk8o What's a Dremel?

    Joined:
    22 Jan 2002
    Posts:
    138
    Likes Received:
    1
    i agree with RTT on the use not learn part (as i used to use mandrake), but then again if its a test server you might not care, anyhow i use freebsd (always install minimal) becuase it kinda forces you to learn then. +i have a setup sorta like your planning, apache, samba, php+gd+pdf+zlib....etc, mysql, windowmaker...etc (+ftp,ssh,vhosts) and as for problems you might encounter its more a case of being patient (and not launching the computer skywards) if youre not familiar with a new os,

    Good luck :)
     
  4. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    Okay, so if I set up a bunch of different websites, such as dw.woventhorns.com and test.woventhorns.com I could add this to my httpd.conf file:

    NameVirtualHost *:80

    Code:
    <VirtualHost *:80>
    
    ServerName dw.woventhorns.com
    DocumentRoot /www/dw/htdocs
    
    </VirtualHost>
    
    <VirtualHost *:80>
    
    ServerName test.woventhorns.com
    DocumentRoot /www/test/htdocs
    
    </VirtualHost>
    Then just use my hosting provider's CName tool to point dw.woventhorns.com and test.woventhorns.com to my IP?

    What do I need to change so when I type in test.woventhorns.com or dw.woventhorns.com it will go to my own webserver?
    (I can't type in my own IP because of the DSL modem I use, I have to use localhost or the standard localhost IP) I used to change svchosts or hosts, or something like that in windows xp.
     
  5. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    Yep, that'll do great :) You may want to add in some other directives to make use of apache logging and stuff,though :)

    The way you would access it, assuming you're using windows, is to edit the 'hosts' file which is located at c:/windows/system32/drivers/etc'

    and add:

    Code:
    a.b.c.d dw.woventhorns.com
    a.b.c.d test.woventhorns.com
    where a.b.c.d is the internal IP of your server.

    If you're using linux then just edit the /etc/hosts file :)
     
  6. OneSeventeen

    OneSeventeen Oooh Shiny!

    Joined:
    3 Apr 2002
    Posts:
    3,454
    Likes Received:
    2
    Just a minor update, I've decided to give slackware a try, I'm downloading it now, and I plan on downloading only source code for PHP, MySQL, and Apache, so I can learn to compile it myself with the features I want.

    I'm going to try to stick with vi as a text editor, as it appears to be very functional and not too difficult to get used to.

    My only problem now is most of my hardware probably won't work with it, so I'm going to have to find some new stuff. (I was originally going to set up a power pc as my linux box, but then I noticed a problem.... there doesn't seem to be a network hookup (it is a Performa 6116CD), so now to set up a PC I'll have to buy a PSU, NIC, and some sandpaper to lap my last HeatSink.

    Any reccomendations on which NIC works best with linux?

    I'll probably be collecting bits and pieces over the next year setting up a few other linux boxes as well, because it has become somehow entertaining playing with linux command line, so you'll probably see more of me. (after I read the man pages, don't worry!)
     
  7. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    Pretty much any recent NIC will work with linux, slackware will probe for one on the install. I've seen mobos as old as socket 370s with onboard NICs working flawlessly with slack-9.1. You only need CD 1 though seeing as you're going CLi only.

    Good choice with downloading your php/apache/mysql sources :)
     
Tags:

Share This Page