Developmental web-servers are a great method to test new website features or mockups without deploying the code on the live site. Internal testing ensures that users experience minimal disturbance while new features are coded. It also enables programmers to deploy iterations of a code and optimize for performance and stability. In this article, software such as XAMPP and Wamp will be used to create a personal server capable of handling PHP, ASP, HTML, MYSQL and FTP. Lastly, we will also take a look at how this server can be deployed on the internet through the use of Dynamic DNS services.
Items used for our setup:
- A spare Pentium 4 2.93ghz, 2gb DDR, memory tower running Windows Xp SP3
- Older hardware performs exceptionally well in a intranet setting where traffic is limited. In our experiment, the pentium 4 processor had no trouble serving dynamic content through phpbb, WordPress and Joomla to the limited clients on the network. Our biggest bottleneck however was, the wireless G network by which our server was connected.
- A wireless router by which all the computers are connected. We used a Netgear wireless router for the purpose.
- A computer connected to the network to test configurations.
Step 1: Installing the Web server
In the past, Apache, PHP extensions, MYSQL and other items required for a functioning web server had to be installed separately and configured in order to function. Luckily, software such as WAMP and XAMPP come precompiled with these items and save a significant amount of time. In addition, WAMP and XAMPP both include an easy to use interface which allows effective management of services. With the click of a button, items such as Apache may be disabled and the server can be put offline. In our setup, WAMP was used due to our familiarity and previous experience with the software.
- WAMP can be downloaded at: http://www.wampserver.com/en/
- XAMPP can be downloaded at: http://www.apachefriends.org/en/xampp.html
Step 2: Configuring FTP
FTP allows us to transfer files remotely from other computers. In our project, the open source Filezilla ftp server was used in order to initiate FTP service on port 21. XAMPP includes Filezilla ftp extensions and thus, this item does not need to be installed separately. In order to enable the FTP service, simply click on the XAMPP interface icon from the taskbar and click the, “start” button beside Filezilla. You may also wish to make FTP a service which starts with windows. In order to do so, click the, “svc” checkbox located beside the item in the XAMPP interface. If you are running WAMP, Filezilla must be installed separately by following the link below.
- Filezilla Server can be downloaded at: http://filezilla-project.org/ (Make sure you download the server and not the client!)
Upon initial startup of the Filezilla server interface, you will be presented with a screen asking Server Address, Port, and Administration Password. By default, WAMP does not secure the Apache server. In an internal environment, it is not absolutely critical to secure the server as, only trusted computers within the network will have access to it. Fill them out using the details below:
- Server Address: 127.0.0.1 or localhost
- Port: 14147
- Administration Password: Leave this field blank
- Check off, “Always connect to this server”
After successfully implementing a FTP server, we must now add users and specify their permissions. In order to add FTP clients, we must launch the FileZilla server interface. From the menu settings proceed to: Edit -> Users. Next, click on the add user button and specify a account username. Once the account has been created, we must secure it by specifying a password under the “Account Settings” frame. Ensure that you do not create unsecured FTP clients with names such as: Guest, or Anonymous or Administer. Potentially unwanted users may gain access to your system through FTP.
After creating a user account, we must now specify which folders the client has access to. Click on the Shared Folders tab on the left side of the Users panel. Now, click on the Add button and direct to the Wamp www folder. In our case, the path leading to the www folder was C:\wamp\www. After specifying the directory, our next step is to enable actions that the user is able to initiate remotely. We wanted to give our ftp account full access. To do so, we enabled:
- Files: Read, Write, Delete, Append
- Directories: Create, Delete, List, +Subdirs
Additional settings can be tweaked through Edit -> Settings to limit items such as maximum number of simultaneous FTP connections and the length of each FTP session.
Step 3: Configuring Router for Static ip address
When connected to a router, computers within the network are subject to dynamic ip address changes. A computer with the network address of 192.168.0.2 may renew with a ip of 192.168.0.4. Changes such as these are inconvenient as, the server will become remotely inaccessible at the old ip address. In addition, scripts such as WordPress that are installed using a path of 192.168.0.2/wordpress will cease to function correctly until the configuration file is manually altered.
In order to assign a static ip to our server, we must go into the web interface of the router.For Netgear routers, the web interface can be accessed by pointing the browser to: 192.168.0.1. Each manufacturer assigns a different path to get to the browsers web interface and has a different method for assigning a static ip address. Please refer to your router manual for complete instructions.
For Netgear Routers:
- Once within the interface, find a setting labelled LAN SETUP.
- Under the address reservation heading, click the Add button.
- A list of connected clients will now show up. Identify the server through the unique device name and click add.
- Now the server should have a permanent static ip on the network.
Step 4: Allowing Remote Access & Testing Server
If you have a firewall software installed, typing the server’s ip address from a remote computer on the network will give a, “Server taking too long to respond” error. In order to allow external access, we must specify firewall permissions for FTP and the Apache Web server. In our case, Windows Firewall exceptions needed to be added. This was done by clicking the accurately named, “Exceptions” tab within the Windows Firewall configuration panel. You may need to read software guides for your firewall application to accomplish this task.
FTP rules
- Add exception for Port 21 (FTP uses Port 21 TCP for incoming/outgoing)
- Add exception for Filezilla server.exe (Found within Filezilla installation directory)
Apache Web server rules
- Add exception for Port 80 (Apache uses port 80 TCP for incoming/outgoing)
At this point in time, features such as phpmyadmin (An amazing script to manage MYSQL databases) are still unavailable to users on the network. In order to enable phpmyadmin access, go to Wamp installation folder and navigate to Alias. Next, open the phpmyadmin configuration file and replace the contents within the <directory></directory> with:
In order to test whether the server is accessible via other computers on the network, simply type in the ip address of the server on the networked computer and you should be presented with whatever is within the \www (\httpd in Xampp) folder. If still presented with an error, you may need to add exceptions to the router’s firewall.
Creating a Demilitarized zone and exposing server to the internet
Through the router’s web GUI, you may place the server in a demilitarized zone. By doing so, the server will be accessible through any internet connected device around the world. If your ISP provides static ip, a domain name can be registered and configured to point to your static ip.
If static ip is not offered by your ISP, a service such as dyndns, freedns, or no-ip must be used. These services typically require the installation of a client which updates DNS settings of the domain upon ip renewal.















Comments: