How do I set up a local home server that will also be used as a web server? I have an old desktop with Ubuntu 12.10 and wish for this to be used as my central web and local server. I also have multiple Windows 7 systems at home that I wish to be part of this network and a wireless router. Where do I start?
XAMPP is a bit of a horrible hack, and unless you're a dev, I wouldn't recommend using it.
To install a LAMP stack, there's three ways. I personally favour installing tasksel and installing the lamp stack from there. The equivilent of that seems to be simply to install the metapackage
You might however want to do this the hard way
Manually to install apache2 its
I then usually set up phpmyadmin (temporarily!) to change the root address of mysql - the 'proper' way to do this, however is to use the mysql cli - use
Now, you need to get everything to work together - you will need to edit apache's php config file with
That should, in theory get everything running.
This is an excellent guide that i used for the same purposes you have.
Setting up the network is pretty simple.
Setting Up Web Server
Follow this guide
Setting up file server
Use this guide
For ubuntu i have no idea but for windows there is iis that comes as a part of windows that can be used to make a home server with help of windows 7 desktop.
Steps to activate/install iis in win 7
Step 1 - open control panel and click programs and features.
Step 2 - there is an option turn windows features on or off or something like this.
Step 3 - look for internet information services and all things you will need like ftp service, asp support and other things you can identify yourself.
Begin with setting up a LAN on your Development System
You can set up your Windows 7 devices together by setting up a homegroup by going to
It will be a good idea to have a pen and paper at hand to take down some ip details. I personally just keep a text file on the desktop and eventually share it to each system as they join the network and add each new system's details to this file (which is set up for sharing). Once your network is set up you can share this file in the network by putting it in the
Take Down your DNS and IP details
From the device where you set up the
I had two IPv4 addresses I noted both, but the one under
If this system is perhaps going to be your host, then take down the DNS adresses to point your domain to. For me, this is my development system and I do not wish to host on this machine.
Install Xampp on Windows System used for development
Even though I won't be using Xampp to host with on my development machine (the one where I set up
Connect secondary system
On the secondary Windows 7 device you should be able to
Ping your Development system
Unless you are able to do this, you won't be able to proceed to the next step.
To ping your development system by opening a new command prompt or
Test your LAN (or WLAN)
If you pinged succesfully, you can now test that your services are accesible over your LAN by simply opening a browser and typing your development machines IP and the port for Apache(80) or Tomcat(8080) and you should see either service page n your browser.
If you can't access these services from a secondary system on LAN
then most likely the ports are blocked (not by the router) on your development system's firewall. To change this, set
You can not proceed to the next step unless you have successfully done this.
Test your services via WLAN
This part is tricky (or can be). Most likely port 80 is closed by your ISP. You need to go tou your router's Firewall and create rules there for the same ports. This is router specific and I have no way of covering that here. If you don't have a static IP then you probably need to make use of http://dynds.org for this. My ISP has provided me with an excellent router
Now go to http://canyouseeme.org and test that the ports are accessible via WLAN. This ensures that your web server can accept requests over these ports too once you have set it up too as your router is not blocking traffic over these ports if it works. Again, you can not proceed if this step fails.
Set up your server
I am using Ubuntu 12.10. I simply mimic all that I have done on my development machine but alter the install for my Ubuntu "server". I test that my LAN is up to this machine by accessing the services and noting my DNS and local IP in the file I set up earlier and shared in a folder that I made accesible to the network.
I ensure that I have my Xampp for Linux set up and install Tomcat (for my own needs).
I note my local IP through
Add SSH support for your server
Simply installopenssh server on your server via
Tweak your BIOS
For me I go through the BIOS settings to make my host optimal. I sapecially did this to make sure I enabled
Secure your system
Crucially ensure that all services run at lowest privileges and that you have installed and configured all necessary security.
Redirect your domain
You can now redirect your domain to your Web Host. You should not use this system as a desktop anymore and power it on/off like a desktop as this will impact your uptime and may affect your SEO. If you need to acess things on this machine, make use of the a SSH client like Putty to alter things on your service.