The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Networking (http://hintsforums.macworld.com/forumdisplay.php?f=14)
-   -   Web sharing problem (http://hintsforums.macworld.com/showthread.php?t=12039)

rmcellig 05-23-2003 08:55 AM

Web sharing problem
 
I have put a document that I created, titled index.html in iMac/Library/WebServer/Documents folder. When I go to my browser and type in my IP address, I get the:

If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.



Seeing this instead of the website you expected?

What gives? What do I do now? I have port 80 open, and Web sharing on.

intrntmn 05-23-2003 09:50 AM

You have no problem
 
All is well with your setup; there is nothing wrong.

If you remove all of the "default" apache files in your /Library/WebServer/Documents folder, your new index.html file will show up as the default page.


Jack

djn1 05-23-2003 09:56 AM

Re: You have no problem
 
Quote:

Originally posted by intrntmn
If you remove all of the "default" apache files in your /Library/WebServer/Documents folder, your new index.html file will show up as the default page.
Alternatively, leave the /Library/WebServer/Documents folder alone and put your files in the Sites folder in your user account and point your browser at:

IP_Address/~username/

Note that your username must be prefaced by the tilde ('~').

rmcellig 05-23-2003 10:08 AM

Another error
 
This is what I get:

Forbidden
You don't have permission to access /~rmcellig on this server.


Apache/1.3.27 Server at imac600.local Port 80

Now what?

I remember in OS 9, Web sharing was so easy. It seems in OS X that it's a real pain and not obvious to new users.

rmcellig 05-23-2003 10:09 AM

My documents folder
 
All is well with your setup; there is nothing wrong.

If you remove all of the "default" apache files in your /Library/WebServer/Documents folder, your new index.html file will show up as the default page.


I already removed all the files in my /Library/WebServer/Documents folder. All I had in there was my index.html file I created.

djn1 05-23-2003 10:18 AM

Re: Another error
 
Quote:

Originally posted by rmcellig
This is what I get:

Forbidden
You don't have permission to access /~rmcellig on this server.
Are you entering:

IP/~rmcellig

or ...

IP/~rmcellig/

The latter ends in "/" and, assuming you have index.html at the root level of your Sites folder, you should be able to access it. The former throws up an error on my machine too.

rmcellig 05-23-2003 10:40 AM

Still an error
 
This is what I am entering:

http://192.168.4.13/~rmcellig/

djn1 05-23-2003 11:08 AM

Re: Still an error
 
Quote:

Originally posted by rmcellig
This is what I am entering:

http://192.168.4.13/~rmcellig/
And you have an index.html file at the root level of your Sites folder?

rmcellig 05-23-2003 11:19 AM

yes. I just installed Complete Apache, the latest version. I am going to try that. I turned off personal web sharingin the sharing pref pane. I'll let you know how it all goes.

rmcellig 05-23-2003 04:17 PM

I just forwarded port 80 and 427 from my imac to my g4. web sharing works fine on the g4.

what about my imac. what should i do to get it working? Trash some pref and/or cache files?

djn1 05-23-2003 04:22 PM

Quote:

Originally posted by rmcellig
I just forwarded port 80 and 427 from my imac to my g4. web sharing works fine on the g4.
You've lost me now. Are your machines networked behind a router? What's confusing me is when you say you've forwarded port 80 and 427 from the imac to the g4. Could you give a little more info about your setup?

rmcellig 05-23-2003 04:30 PM

I have a lynksys router. i just forwarded port 80 and 427 to my g4, on the router.

djn1 05-23-2003 04:32 PM

Quote:

Originally posted by rmcellig
I have a lynksys router. i just forwarded port 80 and 427 to my g4, on the router.
OK, and when you do this on the iMac it doesn't work? You mentioned deleting caches - I've found that Jaguar Cache Cleaner is quite effective. Incidentally, what traffic goes on port 427? I have web sharing set up on my machine and have only forwarded port 80.

rmcellig 05-23-2003 04:38 PM

A friend of mine told me that 427 is another http port. i tried with port 427 on and off, keeping port 80 open all the time.

rmcellig 05-23-2003 04:40 PM

On my imac, when I put the same index.html file i have on my G4, into the documents folder on my iMac, it doesn't work.

The documents folder which is in the webserver folder.

djn1 05-23-2003 04:49 PM

There's some info about port 427 here. As for your iMac - I don't know what else to suggest other that the usual t/shooting stuff; i.e. log is as another user and see whether it works, fsck etc etc ... Good luck with getting it sorted.

rmcellig 05-23-2003 05:24 PM

Problem solved!!
 
I upgraded Safari from version 73 to 74. Works great now!!

djn1 05-23-2003 05:30 PM

Re: Problem solved!!
 
Quote:

Originally posted by rmcellig
I upgraded Safari from version 73 to 74. Works great now!!
lol ... if only all problems were as simple though it's odd that v73 didn't work for you.

rmcellig 05-23-2003 05:33 PM

Amazing isn't it? I thought to myself that what if I launch Internet Explorer and give it a shot. It worked.

So.....I upgraded Safari to the latest version and it worked like a charm.

hayne 05-23-2003 06:06 PM

amazing indeed
 
Now that you have things working, it is somewhat academic for you, but just to set the record straight for future readers:

It is indeed amazing that you will get a "Forbidden" error with one browser but not with another.
In fact, I would go beyond amazing and say that it is impossible. If the web server denies access to a page it is because of something in the web server configuration or file permissions - it has nothing to do with the browser. Unless of course the page in question does some fancy browser-dependency checking, which is not the case here.

So I maintain that the reason it is now working for you is that something else has changed - it isn't the browser. I would be very interested to be proved wrong about this. E.g. if you could go back to using a different browser and get the "Forbidden" error again.

(added later) I realize now that if you specify an incorrect URL then it might give you different results on different browsers since some browsers might correct the URL for you. But this didn't seem to be the case for you, so the situation remains "amazing"

rmcellig 05-23-2003 06:59 PM

The problem seems to be with Safari. For example, in Safari, if I type http://192.168.4.10/, i get:

If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.






Seeing this instead of the website you expected?




This page is here because the site administrator has changed the configuration of this web server. Please contact the person responsible for maintaining this server with questions. The Apache Software Foundation, which wrote the web server software this site administrator is using, has nothing to do with maintaining this site and cannot help resolve configuration issues.






The Apache documentation has been included with this distribution.




You are free to use the image below on an Apache-powered web server. Thanks for using Apache!

In Internet Explorer, typing the same URL as above, I get the proper web page showing up [the one I created, index.html.

Very interesting. I'm using v74 of Safari. I can duplicate this on my other Mac as well. I'm running 10.2.6.

aixccapt99 05-23-2003 07:28 PM

In reply to hayne's point about this being *very weird*:
I totally agree. But I thought of one reason for why switching browsers worked: a caching problem in the older version. If it was incorrectly hanging on to old versions of the pages (ie a Forbidden page, or the apache install page, or whatever), Safari might've been improperly assuming that those versions were current, and not actually reloading the new file--despite the old one not being there anymore. So apache is not necessarily at fault...

Might be limited to sites in the Rendezvous listing (I remember a .local reference somewhere in the thread), might have been global--I run 10.1 and wouldn't know. But that's a possible explanation.

Joe

hayne 05-23-2003 08:02 PM

caches
 
Yes, thanks aixccapt99, this is indeed likely to have been a caching problem.
When testing out your own web ste, it is often necessary to clear the browser's cache in order to see the effect of changes. If you see something "weird" happening, this is a strong sign that you should clear the cache before going further in your investigation. Safari makes this easy by having an "Empty Cache" menu item but for most other browsers you need to do this via Preferences, sometimes in the "Advanced" section.


All times are GMT -5. The time now is 09:32 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.