Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Turn desktop PC into an Apache server?

  • 17-08-2012 3:42pm
    #1
    Closed Accounts Posts: 27,857 ✭✭✭✭


    Hi guys,

    I'm working as a web developer at the moment, but my dirty little secret is that I know fook all about servers and that kind of thing! :D Anywho, I'm looking to remedy that now

    I want a bit of a sandbox/playground, where I can try out things like cron, ssh, f*cking around with Apache, etc., and if I break it I can just start from scratch.

    Is it possible to just take a desktop Dell machine, install Linux on it, install Apache, and have it work just like any hosting that I would pay for, albeit with sh*tter spec?

    Can I actually host a website/app on that server too, and point a domain, etc.? I don't need much storage, and the websites wouldn't be getting too much traffic or anything. Can I use the wireless internet connection in the house (it uses a linksys router)?

    As you can see, I know very little about this lark :)

    I don't have any money to be spending on this, FYI!

    Cheers

    edit

    And also, how do I do this? :) Any good tutorials would be great. I've only ever installed Apache to set up a local server using XAMPP.


Comments

  • Registered Users, Registered Users 2 Posts: 36,170 ✭✭✭✭ED E


    First off, yes, you could theoretically turn any machine into a "server", but the real difference between a server and a desktop is a huge amount of raw cpu power, ECC Ram & lots of IO bandwidth. Also stability, but you dont really care about that. So while any machine will "work", it may not really work.

    Dont host a site on your home connection, ISPs dont like that at all. Also I wouldnt use wifi if you want to have it reliably online. You'll want maximum throughput for RDP(Remote desktop). Also, you'll need to learn to configure you're router to allow the access you need, but not compromise your LAN.

    If you want a start point install Ubuntu Server 12.10 LTS or a similar distro(or server 2008 if you have access to a copy) and work on becoming fluent in bash and how to SSH. Then try apache, php etc.

    BTW, this will be a fair bit of work for somebody who is pure HTML/CSS.

    What hardware do you have to use?


  • Registered Users, Registered Users 2 Posts: 200 ✭✭druidhill


    You can achieve a lot of what you want to do easily (and all of it with a little bit of extra effort) by just installing something like Ubuntu server as a virtual machine on the desktop. It would only be for test purposes, so performance won't be an issue. Once you have a working baseline webserver, take a snapshot, so you can restore it if you do make a mess of things. There is plenty of info on this online already, so you'll have to look into that yourself first. The only cost will be your time.


  • Closed Accounts Posts: 27,857 ✭✭✭✭Dave!


    Cheers for the help gents.

    I've gone for the virtual machine option, with Ubuntu Server 12.04 LTS installed as a VM using Oracle VirtualBox on a Windows machine.

    I've got it all set up and working, and have installed a LAMP stack and OpenSSH.

    So I'm wondering what the next step is! :-/

    Don't worry about performance issues at all, if I do host a website on it then it'll only be for testing purposes really. Nothing important. Barely any traffic at all. I mainly want to be able to connect to it with SSH and probably FTP, and play around with installing and configuring various software stacks.

    I'd rather not mess with the home broadband/wifi if at all possible, cos my family use it alot. But obviously I'll need to piggyback off this connection in order to be able to connect to the server from another machine.

    So:

    1. What do I need to do now so that I'll have a static IP address that I can SSH to? Where do I get the IP address? Or will I be using the one assigned by the ISP for the wifi/broadband?

    2. In which directory do I create the directories for each site I want to host? /root/home? And how does it get mapped so that when someone lands on my server, they're sent to the appropriate directory for the domain? Do I need to install a DNS server for this?

    Thanks alot!

    @ED E, I'm a PHP/MySQL developer, only 2-3 years' experience though. I'm comfortable getting around in Unix, though I have to look up most commands beyond cd and ls :p


  • Registered Users, Registered Users 2 Posts: 758 ✭✭✭platinums


    Windows or Linux it doesn't matter, Install Xamp/Lamp and you have a working Apache server, now just open the ports (on computer/router whatever is used) to make it web accessible.

    Lamp breaks down to Linux/Windows, Apache, Mysql, Perl/PHP.

    You will or should get acquainted with the above mentioned as they are very useful for the webhosting line of work.

    If you want your testing Xamp to go to production you must lock it down, ie change passwords and follow the Xamp security precautions.

    1. What do I need to do now so that I'll have a static IP address that I can SSH to? Where do I get the IP address? Or will I be using the one assigned by the ISP for the wifi/broadband?

    Ask for one from your Broadband Provider, (Eircom are currently €10 or there abouts. etc) alternatively use a Dyndns Client to update your IP address to a DNS address eg. myserver.com which will map to your current Dynamic IP Address this is free.

    2. In which directory do I create the directories for each site I want to host? /root/home? And how does it get mapped so that when someone lands on my server, they're sent to the appropriate directory for the domain? Do I need to install a DNS server for this?

    Apache is usually "HttpDocs" in the root.
    myserver.com/"foldername"


Advertisement