How can I get apache to serve my local website without a network connection??

ms_kle

Registered
I'm trying to view my local web site at http://204.161.58.5/~kle/index.php, where 204.161.58.5 is the ip address of my G4 powerbook, without a network connection, but it doesn't work. The web browser keeps looking and looking, but no response. I noticed that when I go to the System Prefs and view the Sharing Options, the "Web Sharing" option is "On," but my IP address is not present at the bottom of the screen... When I click the little "edit" button next to the empty space to go to the "Network Setings" pane, the IP address is there where it should be... When I connect a live CAT5 wire to the ethernet port and reboot, the IP address appears in the "Sharing" pane when I go to look at the prefs again. Can anyone tell me how to get my G4 Powerbook/500 to start web sharing services even though I don't have a live CAT5 connection? It's annoying to try and design a web page and not be able to see it... Thanks in advance! ;)
 
Hi
If I understand what you are trying to say you are thinking way too hard. You want to look at a file on your hard drive with your browser? Just go to your browser-->File-->Open-->Locate the file (I guess index.php)-->Click Open. Or if you want to feel cool go to the the url bar and type file://(and the path such as this for the Apache's default page in Mac OS 10.0.4 file://localhost/PowerBook%20G3%20OS%20X/Library/Webserver/index.en) PowerBook G3 OS X is my hard drive so replace this with your hard drive name and %20= (a space). Is this what you wanted?
 
Thanks for the reply... but it's a little more complicated than that... I'm trying to view a website that I'm developing with embedded PHP scripts... It's not a flat file, so I need Apache to actually serve the file so that the PHP is parsed and interpreted... So.. I need to do this on the road and can't get apache started without my computer being connected to a live wire first... :( I'm hoping to find a way to start Apache services without a connection...
 
I use my machine to develop Web Sites using MySQL, Perl, SSI etc...

It's not too complicated, but let's see if I can spell it out correctly:

To find a web-site on the internet your computer needs to turn a name "www.whatsitsname.com" to an I.P. Address "127.1.1.154" and you usually use a Domain Name Server (DNS) to resolve those. Well, in a way you can set up your own on your MacOS X.

Open NetInfo Manager in your Utility Applications.

You're going to need an Administrators access to change these things, so go to "Domain > Security -> Authenticate". Type in your Administrators user-name and password.

In the interface you'll see three columns at the top, and a display window at the bottom. In the center column at the top, find and select "machines". In the column at the right a list of machines will show up.

Select "localhost" and 'command-D' to duplicate that record.

Select the "localhost copy" and in the window at the bottom of the interface change the name from "localhost copy" to whatever you want. I use the name of the website I'm developing with the ".me" extension.

You'll be getting some Alert dialogs asking you to confirm these changes. Just OK them and move along.

Quit NetInfo Manager and launch your browser. If you've got your httpd.conf file for Apache set up correctly (which I'm not going to go into now), and you've got Web Sharing turned on, you should be able to type into the address bar "http://" + whatever name you made up in the earlier site, and you'll get your web-site to show up.

Making sure your development directories and deployment directories match... well, if you're developing websites, you should know how to do this stuff...

-jerry
 
Back
Top