| Setting Up the Alpha Five Application Server | |
|
How to run the Alpha Five Application Server
from your Office or Home Office PC
So far You have created some A5W pages or maybe even a full fledged web application. Now it’s time to deploy. That is, you want to allow people to go to a website so they can see and use the web pages you’ve created. You probably already know that your Alpha Five web pages will only work if they are put on a PC running the Alpha Five Application Server (which we'll call the App Server). And you may know that there are a couple of web hosting providers that run the App Server. (One of them is Firmsupport.com. See the hosting page for other options.) But you want to find out whether it would be feasible for you to run the web server yourself on your office computer or home office computer. Besides saving money in hosting fees, when you host yourself, it's much easier to create hybrid desktop and web applications. That's because both the desktop part and web part of your applications can share the same tables (and therefore data) without the need to figure out remote database connections or synchronizations schemes. In other words, hosting on your own PC can make building and managing your applications much simpler. This may sound good to you, but you probably have some questions: Will the performance and reliability be adequate? How long will it take to set up and how easy will it be to maintain? Is it safe? What do I need? There's good news. Just about anyone can run the Alpha Five Web Application Server successfully and with confidence! You just need a little information. And this article will give you exactly what you need. So let’s start with your concerns: Concern #1: Is this approach good enough? You want a website that works quickly and is available 24/7. Can you really get that by running a server yourself in your office or home office? Yes you can. If you have fairly reliable Internet access, your server will run dependably for you, even if you are just using a DSL or Cable Internet connection. And there are ways to increase your uptime, too. Concern #2: Is it safe enough? You’ve heard the saying, “Fools rush in where [wise men] fear to tread.” (Alexander Pope 1688 – 1744) The guy who first said that probably wasn’t talking about setting up a web server. But naturally anyone would be nervous to rush in. We’ve all heard horror stories about fiendishly clever hackers - and the truth is that any time your computer is connected to the Internet (even just browsing the web), your computer is at some risk. However, with Alpha Five - and a little knowledge - you can set up a web server the safe way and without fear. So let’s look at the core of this issue: running a web server means that you are allowing outsiders to access your PC. That may sound scary – but it’s not nearly as bad as you may think. You see, Alpha Five creates a special folder on your hard drive called the web root folder (typically this folder is C:\A5Webroot). People from the outside can ONLY look at the files and web pages that you deliberately put into this folder (and only this folder). Visitors simply can’t see and can’t access any other folders on your hard drive - or any other computers on your network. Alpha Five won’t let them. And on top that, the actual data that you collect or display on your pages can be stored in tables that you place OUTSIDE of the web root folder – so YOU control what data get displayed and to whom. Concern #3: Will this take a lot of my time? Is this going to take a long time to set up or - more importantly - to maintain? You want the web server to help you become more efficient and more productive. So naturally if installing it and running it takes a lot of time, that would defeat the whole purpose. Not to worry. Even if you are a complete newbie, it should take very little time to get everything set up. And as for maintenance – it’s practically a no-brainer. Once it’s set up, your primary job is making sure that the computer is plugged in and turned on. And just like any other computer, yours may occasionally crash and need to be restarted. Lastly, it’s a good idea to stay up-to-date with the latest version of the server and the latest security patches from Microsoft. (Windows can do the latter for you automatically.) OK – we hope we’ve adequately addressed your concerns and you’re ready to read on and get started. If not, feel free to send an email to sales@alphasoftware.com with any concerns you still may have. Getting Started First let’s make sure you have what you need. What you need:
What you DON’T need:
Understanding the Basics This is a how-to article with practical advice, so we’re not going to bog you down with too many technical details. Let’s just say that what happens between a visitor’s web browser and a web server is very intricate. So we’ll only get into technical details that we absolutely need – starting with this simplified explanation. Think about setting up the Web Application Server as opening a channel of communications between visitors’ Web browsers on their machines and Alpha Five on your machine. If this channel is open and Alpha Five is running, then your job is done. So let’s look at this channel in detail:
Now, you don’t have any control over the visitors’ browsers, you don’t have any control over the Internet and you don’t have any control over most of the other links in this chain, either. There are only a few areas with which you need to concern yourself, and those are highlighted below.
In this article, we’re going to show you exactly what you need to do, step-by-step, to get your server onto the net. And for convenience, we’re going to start with the Alpha Five Application Server and work backwards to NO-IP. Step 1: Activating and Configuring the Alpha Five Web Application Server Starting Alpha Five is the simplest of the four steps. There are only a few critical settings you need to know about, and we’ll cover them here.
The Alpha Five Web Application is now running. You can test it for yourself in a web browser if you like. Just type in the URL http://localhost:8080. The next step will be to allow outsiders to come through the Windows firewall to get to the server. Step 2: Configuring the Windows Firewall This step deals with configuring the Windows Firewall. The Windows Firewall isn't availavle in Windows 2000. It became a built in Windows component starting with Microsoft XP (SP2) and Windows 2003 Server. If you have a different firewall or an additional firewall (like ZoneAlarm), you’ll need to follow the documentation or online help for directions.
To understand firewalls you need to understand ports – at least in general terms. A port is a channel of communications. Ever seen a CB radio? Channel 19 (in the USA anyway) is the channel to talk to truckers. Channel 9 is the emergency channel. Think of ports as channels… except that your PC can use multiple ports at the same time. And there are 10,000 of them (CB’s have only 40 channels.). For web traffic, port 80 is the most common channel to communicate. In fact, it’s assumed when you type in a web address, like http://www.alphasoftware.com, that you mean “please go to the server at alphasoftware.com through port 80.” Another way to access the Alpha Five website is by including the port number: http://www.alphasoftware.com:80 But you don’t need the “:80” because it is assumed by your browser that if you leave off the port that you mean port 80. OK – once you know the basics of ports, the concept of a firewall is going to make a bit more sense. A firewall’s job is to prevent traffic from coming from the Internet to your PC via any of the ports. So, in order for someone from the outside to get to your web server, you will need to tell the Windows firewall that you wish to make an exception and let in web traffic. Here’s how.
Step 3: Configuring your Router If you don’t have a router – and your PC is plugged directly into your cable modem or DSL modem – then you can skip this step, since it doesn’t apply to you. OK, your first question is probably: why do I need to configure my router? Here’s why. In order for a web visitor to get to your site on the Internet, the visitor’s browser needs your IP address. Think of the IP address like a phone number. Each of the computers connected to your network all share this same phone number. When a call comes in, the router needs to know which computer to forward it to. And this process is called “port forwarding.” Each router manufacturer has a different interface for setting up port forwarding. We are going to use Linksys here as an example, but the principle is the same if you are using Netgear, 3M, D-link, Belkin or any other brand. Don’t take these instructions too literally… manufacturers change makes and models all the time, so these directions may vary from what you need to do - even if you have a Linksys router.
For Linksys, here’s how you configure port forwarding. First you need to get to the configuration screen, which you do via a web browser. In the address line, type http://192.168.1.1. A box appears asking for a username and password. If you have not set a username and password before, leave the username field blank and type admin into the password field. Once you’re logged into the router, choose the Forwarding tab. (It may also be called Applications/Gaming). A screen like this will appear:
On this screen, there are two critical pieces of information you need to supply: (1) what port do you want to use for incoming web traffic and (2) to which computer do you want to forward this traffic.
So, set this setting to port 8080 instead. You’ll notice on this screen that Linksys asks for a range of ports. So you need to type in 8080 twice - once as the starting port and once as the ending port. OK – now you just need to tell the router to which computer you want to send this web traffic. You do this in the IP address column. So what do you put here? Remember our discussion of IP addresses and that you only had one that is shared amongst all the PCs in the network. That wasn’t quite the whole story. Your PCs all do share one external IP address… but each PC has its own unique internal IP address, and it’s this internal IP address that you need to enter here. So how do you find the internal IP address? Simple. Just follow these instructions. On the PC where you will be running the Alpha Five web server, choose Run from the Windows Start menu. When the Run box appears, type in COMMAND and click OK.
A DOS box will open with a command prompt. At the prompt, type ipconfig and press ENTER.
On the line that reads IP Address, you’ll find your internal IP address. Enter this IP into your router, save your changes and you’re done.
Checking Your Work So Far With the Web Application Server running and firewall and router configured, you are on the Internet. So now would be a great time to check your work. To do this, we’ll see if we can get to the Alpha Five server via your external IP address. Don’t know your external IP address? Finding it is easy. Just to go to: http://www.whatsmyip.org/ and at the top of the screen in bold letters you’ll find your IP address. Open a web browser and type your External IP address, followed by a colon (:) 8080, like this: http://123.45.67.89:8080 (Only, you need to fill in your actual external IP address, not the sample one above.) Once you enter this address followed by a colon and the port number, you should see the test page you created earlier.
If this is what you see, terrific. Everything has gone right and you can skip ahead to step 4, Configuring NO-IP. If you get this instead:
That’s actually a good sign, too. The “This server does not allow directory browsing” just means that you don’t have a page to display in your web root folder. Put a web page in c:\a5webroot and call it index.a5w and the page will display. If you get the “not licensed for remote access page,”
it means that the web server hasn’t been activated with a serial number. The good news is that everything else is configured properly. And if you get something else, like “page cannot be displayed,” then something is not configured correctly.
Chances are it’s one of a few things. So go back and check the following:
Still doesn’t work? Skip ahead to the Need Help section at the end. Step 4: Setting up and Configuring NO-IP At this point, visitors from the Internet can visit your web site, but only if they type in the correct IP address and add the port number to the end. This is not particularly convenient, and it gets worse. You see, chances are your ISP has supplied you with a dynamic IP address. That means every so often, and without warning, the IP address will change and you’d have to supply your visitors with the new address or they won’t find your site. But there is a convenient solution. Services like NO-IP.com are designed to handle this exact situation. Here’s how it works. You set up a URL with NO-IP for your visitors to enter into their web browser. You have two choices, you can use one they provide to you, or you can use your own. If you use one they provide, the service is free, and you’ll get a URL that’s something like, mybusiness.NO-IP.com. If you use your own domain name there is a small annual fee (currently US$20 – that’s on top of the cost of registering your own domain name, which will run about another US$20 per year). NO-IP then provides you with a small piece of software to run on your PC. This software constantly monitors your IP address and reports back to NO-IP. When a visitor types your URL into their browser, they are taken first to the NO-IP site and then redirected to your current IP address. NO-IP will even specify the correct port number. And all of this happens within seconds (or split seconds) – making the process seamless.
NO-IP is fairly easy to use. First go to NO-IP.com and sign up for an account. Then follow the instructions for setting up a new host account. Here are some of the controls you’ll see while setting up.
In this example, we are using our own domain name called mybusiness.com. Notice that the Port 80 Redirect option is selected and that port 8080 has been entered as the port to use. You can leave the IP Address box alone, since the NO-IP client software will keep this setting up to date. It can take NO-IP several minutes or more for your request to be processed. You’ll know it works when you type in your URL and you see the page you put up on your web server. When it works, pat yourself on the back. Well done. The path is complete, and voila – you’re hosting your own site. Congratulations! Save these instructions in case you need to set up your server on another PC – or if the server stops working for some reason and you need to troubleshoot. In Closing If there is a topic you would like to see covered in an upcoming guide, please send us your request. The email address is guides@alphasoftware.com. Still need help? Go to alphasoftware.com and go to the Message board, which you’ll find under the Support menu. Search to see if someone else had the same issue as you (and what the resolution was) or write a post explaining the situation in as much detail as possible. If you have feedback about this article, please send it to: guides@alphasoftware.com. We may not be able to respond to all emails, but we will read all of them and use them to improve this and future articles. (C) 2006-2007 Alpha Software, Inc. All rights reserved. |