First, you have to download the program from Omnicron. It is located here.
Once it is installed, you will have to decide based on your OS whether you want Omni to run as a program in your task tray or as a service. If you are using Win95, 98, or me, you must run it as a program. If you are using NT or 2000, then you can choose. I have Omni running as a service under NT4.0 It has been stable for many years that way.
Ok, once installed, you should pop open you favorite browser and enter localhost. You should get an image a lot like this:
To begin your adventure, click on default.htm. This will show you a congratulations page and help you test and access your own new webserver. Now I will explain what just happened. Your browser just issued a request to WINSOCK. This is a layer of programming that forms a foundation for all Windows internet traffic. It affects Web browsing, email, ftp, chat, and even office network communication.
If your browser couldn't find localhost, then you either didn't have Omni loaded or you didn't have Winsock loaded.
If you have a network card, and installed it's drivers, then you probably have Winsock loaded all the time, even if you aren't connected to another computer. If you don't, then you have to open your dialup connection to get Winsock loaded. Some have reported that all you have to do if you want to work locally (edit and test web pages on your own machine), you can pop up the dialup window, and just minimize it without dialing. Of course if you dial in, then winsock is loaded. Also, if you have DSL it's always loaded.
Now. The request for a website (like "http://localhost") goes to Winsock, which tries to resolve the host name. In other words, the 'net understands addresses in the format "127.0.0.1", not in words like "www.chocolatebrownies.com".
So in order to resolve the host address, computers need a list that says, in effect, This Server Name = This Address. This type of list is kept in two places, one called a Domain Name Server (DNS), and the other is a file called HOSTS in your C:\WINNT\system32\drivers\etc\ directory (somewhere, it's different for Win9x and NT). Once you find HOSTS, you will notice that it looks a lot like this:
# Copyright (c) 1993-1995 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows NT.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
This is a lot easier to understand than it seems, because every line that begins with a "#" is IGNORED by the computer.
The only line that matters to us is the one where it tells your computer that "127.0.0.1" is also known as "localhost".
That's why when you entered http://localhost into your browser, it found your web page. This is very different than opening up HTML pages as files from your C:drive. When you click the HTML file in your folders, and the browser picks it up, Windows is actually just loading the html into the browser, Omni isn't touching it at all. This would be fine, except that you can't run Server side includes, or CGI programs this way. I made a shortcut to my hosts file, like this:
Create a slot for your local website by adding it to the HOSTS file like this:
127.0.0.1 localhost omnilist.loc
...or...
127.0.0.1 localhost
127.0.0.1 omnilist.loc
Why 127.0.0.1? This is a reserved address that means "this local machine" on every machine in the world.
You could have typed http://127.0.0.1 instead of localhost in your browser before.
Make sure you saved your HOSTS file.
The Hosts file is the first place your computer will look to resolve a host name. The second is your DNS server. The DNS server is probably located at your ISP somewhere. You can override your DNS settings by adding data to your HOSTS file. For instance, open your Hosts file in Notepad. Change the line to look like this:
127.0.0.1 localhost www.microsoft.com
Now browse to www.microsoft.com.
Don't worry, the web is intact. The Hosts file only affects your machine. This leads us directly to our next topic, which is...
You can skip this part if you only want to have one web site online - but much of the power of Omni is it's ability to handle multiple web site addresses at once. I have a system for setting up my local web pages so that I can access them without conflicting with the outside world. In other worlds, if I accessed my local copy of "www.omnilist.org" by the same DNS name as the one you are seeing, I would have to go to a different machine to see the live web site. so I name all the local copies of my we sites without the "www" and with a ".loc" suffix. So in my development environment, this web site is called "omnilist.loc".
The next step is to make space for your website on your local hard disk.
htdocs (this is where the web site root is from the outside)data (to store data files for your programs)cgi-bin (to store your cgi-bin programs)cgi-win (to store your VB cgi-win programs)isapi (to store your isapi/nsapi dll's)If you're feeling extra adventurous, you can create some subdirectories in your htdocs directory to help yourself stay organized.
I usually create an images and a stylesheets directory. This keeps the HTML away from the other stuff.
Ok, pop open Omni's control panel.
Note the Web Server Global Settings button. The data you enter here affects ALL the web sites on this server. For now, leave it alone, but when you get to debugging your server, you'll need to check the settings in here.
Next notice the Default Virtual Settings button. These settings are used when you create a new web site. Again, there's not much you'll need to touch in there.
Backup and Restore are for saving ALL your configurations and restoring them to a saved state. Use these if you feel you're starting to exceed your limits. Take a backup before doing major changes, for instance. These functions backup and restore only the server settings, not the web pages and data on your site.
Ok, click the Add button to add a new virtual server.
Enter the local name of your new site, exactly like you created it in the HOSTS file. The new site should appear in the Virtual Servers in this Profile list. Now highlight it and click the EDIT button.
Don't be scared off by all those tabs. Let's just start on the first one.
Make sure that the Server IP is 127.0.0.1. For some reason, mine just defaulted to 127.0.0.2.
The Server name should be exactly what you'll type in the URL Adress line of your browser.
This is where you tell Omni where to find the home page. I will use c:\httpd\omni\htdocs.
Note that we use the backslash here, because we are specifying a disk directory.
Index.html is typical, and it's also why DEFAULT.HTM didn't load when we browsed to localhost before.