Making the Server Serve!

As we discussed in our last class, we now have WAMP Server installed on all the systems in our classroom and in the open lab.  WAMP Server runs under Microsoft Windows, and includes Apache web server, PHP, and MySQL.  You can easily install the same software on your own system if you’re so inclined.  (You can download it free from http://www.wampserver.com/en/.)

Some configuration notes:

When everything is set up correctly, you should be able to point your web browser to http://localhost, and you should see a page confirming operation of all three software components. We ran into a snag Thursday evening, and this did not work correctly on some systems — apparently some other web server was running in place of Apache.  (See note below.) You can publish your own content to this web server by placing the appropriate XHTML documents under c:wampwww.

Once you’ve confirmed that everything is working this far, the next step is to make the web server
visible to other systems. The first thing you have to do is determine the name of your system. The name will be something like LW230-NV070319. You might see it by pressing Ctrl-Alt-Del. If not, click on Start, then right-click on My Computer, click on Properties, and click on the Computer Name tab.

The goal is to be able to enter a URL like http://LW230-NV070319. But Apache, out of the box, has some rudimentary security in place, so you’re likely to get a message about access being denied. If so, don’t despair! Use a text editor to [carefully!] edit the file c:wampbinapacheapache2.2.6confhttpd.conf. Replace all instances of “Deny from all” with “Allow from all” (there should be two of them). Save the edited file. Then you need to restart Apache server: double-click on the WAMP Server icon on your desktop. After it starts up, click the WAMP Server icon in the system tray, and then click on Apache | Server | Restart service. Now it should work! (You’ll need to go through this whole process once on a system, but it shouldn’t be necessary to do it again unless the Windows disk image gets reinstalled.)

Problem: wrong web server?

On our class systems, instead of viewing the page confirming proper operation of WAMP, somtimes you got a prompt for user authentication. This is because Microsoft’s Internet Information Service (IIS) is also running, and depending on how the system started up, IIS may be handling requests through port 80 instead of Apache. (And IIS uses a different folder as its server root than does Apache.) The solution is to simply stop IIS and restart Apache. The approximate procedure: click on Start | Settings | Control Panel. Within Control Panel, you may need to select “classic view”. Double-click on Services. Scroll through the list to find IIS (exact wording may vary), then right-click on it and click on Stop. Once you’ve done that, use WAMP Server to restart Apache.