Home Web Server: Single Page Guide

From The Uniform Server Wiki
Jump to navigation Jump to search

MPG UniCenter

Home Web Server: Home | Overview | Single Page Guide | Install | Security | DynDNS Account | DynDNS Updater | Updater portability | Problems

Quick Home Web Server
Home Web Server Uniform Server 3.5-Apollo.

This page provides a quick tutorial showing how easy it is to put a home web server on-line using Uniform Server 3.5-Apollo.

Install Uniform Server 3.5-Apollo

Create a new folder named uniserver (you can choose whatever name you like)
2 Download Uniform Server (the file you are looking is UniServer3_5.exe) save it to the folder you created in step 1
3 Extract files by Double-clicking on the file UniServer3_5.exe, accept the defaults.
4 Once unpacked you will see a new folder named Uniform Server open this folder.
5 Start the servers by double-clicking on Server_Start.bat, when challenged by your firewall allow connection on all ports.
6 Your browser will start (if not already running) and a web page will open displaying your web server control panel (apanel).
Note: You can run apanel at anytime by typing the following into your browser http://localhost/apanel/
7 With apanel displayed scroll down to the Configurations section of the left menu.
  • Click MySQL Server Configuration at the bottom of this section.
  • The default password (root) needs changing, type in a new MySQL Password and click change. (details)
8 Stop the servers by double-clicking on Stop.bat in folder Uniform Server.

Check out detailed installation

Put Servers on-line

By default Uniform Server is configured to refuse all connections from the outside world. This is controlled by the .htaccess file in folder C:\uniserver\Uniform Server\udrive\www.

Note: C:\uniserver is the folder and drive you used in step 1.

To put the servers on-line edit .htaccess as follows: xxxxxxxxxxxxx

 9  Open folder www
10 Open the file .htaccess in a text editor and change the fourth, fifth and sixth lines to this:
#Order Deny,Allow
#Deny from all
#Allow from 127.0.0.1
11 Save the file.
12 Start the servers, Double-click Server_Start.bat

Detailed information

Test local access

Type http://localhost/ into your browser, Uniform Server image logo displayed (centre of the web page) confirms pages are being served.

Test on-line access

If you have a fixed IP address us that in the following test otherwise you need to determine your IP address.

To do this quickest way is to use the following link http://www.whatismyip.com/ type this IP address into your browser for example http://12.345.67.899/

Uniform Server image logo displayed (centre of the web page) confirms pages are being served to the Internet.

Unable to connect:

This is not unexpected so don’t be alarmed the servers are working fine confirmed by the local access test. The probable cause, port 80 is not open see next section.

Top

Open and forward port 80

Your web server listens for incoming requests on port 80. If you have either a software firewall (such as Zone Alarm or Windows etc) or a NAT firewall (router), chances are it is set to block these incoming requests on port 80. Hence you will need to configure your firewall to allow incoming requests on port 80.

I am not going to attempt to show any examples; you would be surprised at the vast number of firewalls available. If you’re having trouble configuring your firewall, check out this site PortForward dedicated to this topic. If your firewall is not listed post a help request

Top

Dynamic IP addresses

Majority of service provider’s supply a different IP address every time you connect to the Internet this is referred to as a dynamic IP address.

To run a web server you require a fixed IP address allowing other Internet users to access your server. In addition you want a domain name that translates to this fixed IP address.

To resolve this area you require either a Dynamic DNS service provider or obtain a static IP address (costs extra to your standard account) and register a domain name (again extra cost). For testing use a free Dynamic DNS service provider explained below.

Top

Free Dynamic DNS service

There are several free dynamic DNS service providers to choose from, I personally like DynDNS. They provide you with a URL and point it to the IP address of your web server. In addition they provide free clients to update the IP address (effectively making it static).

Create an account at DynDNS log in and set up your account as follows:

Login to DynDNS using your name and password.
2 Click on My services (either use left menu or top right link)
3 Click on Add New Hostname (link to the right of Hostnames)
4 Enter Hostname: that you wish to use (example: fred)to the right select the second part from the drop down menu (example: gotdns.com)
5 Check the Wildcard: box
6 Service Type: select the radio button Host with IP address
7 IP Address: If the IP address field is not automatically filled in click Use auto detected IP address link
8 Click Create Host (You may have to repeat this process if that domain is already in use)
9 Note: When you now click My services you will see your host listed (example fred.gotdns.com) and your IP address.

If you need to manually change your IP address click on your host link it takes you to the config page.

Wait 10 to 30 minutes for the records to update. Start your servers and type your new host name into your browser. In the above example it would be www.fred.gotdns.com Uniform Server image logo displayed (centre of web page) confirms pages are being served.

Check out detailed installation

Note

DynDNS free accounts no longer offer Wildcards a very important feature hence I now recommend DtDNS check out this write-up.

Top

Dynamic DNS updating client

Whenever you connect to the Internet your IP address changes. For your DynDNS URL to work you need to login and update the IP address otherwise it will still be pointing to your old IP address, preventing anyone accessing your servers.

To overcome this manual updating you need to run an update client on your computer. An update client continually monitors your IP address and detects when it changes. On detecting this change automatically logs into DynDNS and updates your IP address. Your URL will always point to the current IP address hence your servers are always accessible.

You have two options either a fixed or portable installation.

Fixed

To obtain a free update client follow these steps:

  1. Go to www.dyndns.org
  2. Click the Support tab
  3. Click Download Now to download DynDNS Updater (3.1.0.15) (save to a folder)
  4. Follow the install instructions at dyndns-updater-guide

The above includes a Window installer, this installs all Windows features such as an entry in the all programs folder.

The installation guide is excellent and easy to follow hence no need to duplicate it here.

Portable

I prefer a portable solution and have written a detailed installing guide the steps are as follows:

 1  Go to Kanasolution.com
 2 Scroll down the page to Without Setup and click the download image to download the file DynDNS-3.1.0.15.zip
 3 Save this file to folder Uniform Server. (contains the start and stop batch files)
 4 Extract the files, right click on the file DynDNS-3.1.0.15.zip and select extract all, click Next and Next again.
 5 This creates a new folder named DynDNS-3.1.0.15 rename it to dyndns_updater
 6 If you wish to save disk space delete the file DynDNS-3.1.0.15.zip
 7 Connect to the Internet
 8 Open folder dyndns_updater and double click on DynDNS.exe
 9 Welcome page is displayed click Next
10 Choose your connection type: Select Local Area Network click Next
11 Public IP address: Click Detect My IP, and check that it detects and displays your IP address. Click Next
12 Hostname Group: Enter ALL (choose anything you like). Click Next
13 Enter your DynDNS account information Username and account Password. Repeat the password in the Confirm box. Click Next
14 Make sure the YES radio button is selected. This downloads all the hosts that exist in your account. Click Next
15 Hostname Information: Check the box for each host that you want DynDNS updater to update. Click Next
16 Check the box enable automatic update. Click Next
17 Leave both radio buttons un-selected. Click Next
18 Click Finished.

If you need a little more help:

Check out detailed installation

Top

Running the Updater

The updater can be run at any time, it is independent of Uniform Server.

How to run

Open the folder dyndns_updater and double click on DynDNS.exe this runs the program and places an icon in the system tray (bottom right of screen). A green square with white tick indicates the updater is working.

Hover over the Icon to displays the current IP address (if it displays 127.0.0.1 connect to the Internet, right click the Icon and force an update by selecting Update IP now)

Note 1: Your firewall will challenge DynDNS.exe access to the Internet always allow access.

Note 2: To view the log file, right click Icon and select Show main window, select the log tab.

How to stop

Right click Icon and select Exit, confirm you wish to stop the program by clicking OK.

Testing

Connect to the Internet, run the updater and your servers.

Type your domain name (host name) into your browser for example www.fred.gotdns.com the Uniform Server default logo is displayed.

If you copy your site to folder www (C:\uniserver\Uniform Server\udrive\www) and refresh your browser you will see your index page displayed.

Your site is now accessible on the Internet enjoy.

Top


Ric