Virtualhosts works but Classic can't see them!

slur

Geek / Hedonist
Hi,

I set up Apache name-based virtual hosts using NetInfo Manager and editing the httpd.conf file according to a great tutorial on MacOS X Hints. It works great for all my MacOS X and Carbonized applications but Classic versions of Netscape and Explorer (and I'm guessing all other network clients) don't see the names and can't reolve my URLs to the local IP address.

To get around it I tried entering my computer's IP address (10.0.0.2) in the browser but this didn't seem to work either...?!

Well, assuming that Apache will answer the hostnames somehow can I get around this some easy way? Someone mentioned making a "Hosts" file and selecting it via the Classic TCP/IP Control Panel. Is it configured like a typical "Hosts" file? Can I select the MacOS X Hosts file or do I need to write my own? Whatever happened to Laura Branigan?

 
I think you need to set up a host file for os9. Basically, I think all your classic applications complain they can't find or resolve the host.

I believe someone had earlier said that classic apps that make internet connections don't show up on netstat in macosx, which is sort of scary.

Anyway, I guess classic apps run in osx still rely on Open Transport (ug!).

In the tcp/ip control panel, there's an option like "Select host file" or something. Click it and it will ask you for the location of the host file with one of those os9 open-file-boxes. Better create the file first.

Open Transport (and old school MacTCP) have host files quite similar to DNS record files. Check Macintosh HD:System Folder:Hosts for a sample host file (I'm almost positive its there).

Hope that sheds a bit o' light. If you can't find the sample host file, someone here can post one. (I obviously can't find mine - I think I deleted it thinking it was useless.)
 
Turned out that entering the IP address worked, but you're quite right. A Hosts file (in the standard format) does the trick. This page helped a lot:

http://til.info.apple.com/techinfo.nsf/artnum/n75085

So the lovely working hosts file I created looks like this:


;
; Hosts File
; for talking to MacOS X domains
;

localhost CNAME 127.0.0.1 ; loopback
lucidity.org A 10.0.0.2 ; root domain
sql.lucidity.org A 10.0.0.2 ; PHP Tool Dev
kid.lucidity.org A 10.0.0.2 ; PHP Misc Dev
totn.lucidity.org A 10.0.0.2 ; Home Page Dev


CNAME indicates that a single word stands for a URL or IP address.
A indicates an address requiring a dot-name.

The ability to have multiple domains on my combination MacOS 9 / MacOS X desktop with dynamic PHP and MySQL to play with is just amazing. Somebody please make Apple stop... They're blowing my mind!

 
Back
Top