Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Help me with websharing/apache

Help me with websharing/apache
Thread Tools
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 01:41 PM
 
I'm trying to get apache started on my box and failing miserably.

I have disabled Brickhouse which I use as a firewall. This is confirmed by the fact that the firewall settings in system prefs are available. I have switched that firewall off also.

I have ticked the box in 'sharing' named 'personal web sharing' and hit 'start'.

If I try to access the index.html page in 'shared' folder using <http://192.168.0.2/~simon2/index.html>(where 192.168.0.2is my internal ip address and simon2 is my short username) I get an error saying i don't have permission to access that page on the server.

I have tried to access the page on a win box on the same network also, same result.

Can someone get me past this please?

Many thanks.

Simon
     
Mac Elite
Join Date: Jul 2002
Location: Tronna
Status: Offline
Reply With Quote
Jan 13, 2003, 01:50 PM
 
Try http://127.0.0.1/ first, that will give you the default Apache page. If you don't see that, then something's not working.
By the way, if you do http://127.0.0.1/~simon2/index.html , that index.html page is in your Sites folder.
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 01:57 PM
 
Originally posted by GoGoReggieXPowars:
Try http://127.0.0.1/ first, that will give you the default Apache page. If you don't see that, then something's not working.
By the way, if you do http://127.0.0.1/~simon2/index.html , that index.html page is in your Sites folder.
GoGoReggieXPowars,

Thanks for the quick reply...

I *can* see the default apache page but when I try to reach my index page in my sites folder (your second link) I get:

Forbidden
You don't have permission to access /~simon2/index.html on this server.Apache/1.3.27 Server at simonmartins-computer.local Port 80

Make any sense of all this?

This ought to be really simple...

Thanks

Simon
     
Junior Member
Join Date: Dec 2001
Location: Sweden
Status: Offline
Reply With Quote
Jan 13, 2003, 02:04 PM
 
Check the file permission priviliges on your index-file. It could be that it is set to not allowing others to read it.

//megus
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 02:33 PM
 
Originally posted by megus:
Check the file permission priviliges on your index-file. It could be that it is set to not allowing others to read it.

//megus
The file was in fact set to 'others/no access' but setting this to 'others/read&write' still makes no difference

Any other suggestions?

Please...

Simon
     
Mac Elite
Join Date: Jul 2002
Location: Tronna
Status: Offline
Reply With Quote
Jan 13, 2003, 02:34 PM
 
megus sounds on the right track, it is possibly a permissions issue.
Alas, I'm not on my Mac at the momement, so I can't quickly tell you where to go to change things. It's all from memory at this point.
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 02:36 PM
 
Originally posted by GoGoReggieXPowars:
megus sounds on the right track, it is possibly a permissions issue.
Alas, I'm not on my Mac at the momement, so I can't quickly tell you where to go to change things. It's all from memory at this point.
The ~/sites/index.html page is now set to 'others/read&write' and I have repaired permissions with disk utility...

Still no good.

Simon
     
Junior Member
Join Date: Dec 2001
Location: Sweden
Status: Offline
Reply With Quote
Jan 13, 2003, 02:48 PM
 
Checked the Sites-folder yet?
It too needs to be set up with reading permission for others.

[Edit: And while you're at it check your Home-folder to ]

//megus
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 02:56 PM
 
Originally posted by megus:
Checked the Sites-folder yet?
It too needs to be set up with reading permission for others.

[Edit: And while you're at it check your Home-folder to ]

//megus
'Sites' folder is set to 'others/read&write'

Surely not the Home folder... :-)

Still no go.

In any case, surely I should be able to open this file myself, in my own home folder without permission issues?

More please...

Simon
     
Junior Member
Join Date: Dec 2001
Location: Sweden
Status: Offline
Reply With Quote
Jan 13, 2003, 03:12 PM
 
Not read/write! Read only.

Here are my settings for permissions:

megus (my home-folder):
Owner: megus (Me)
Access: Read & Write
Group: Staff (Me)
Access: Read only
Others: Read only

Sites-folder:
Owner: megus (Me)
Access: Read & Write
Group: Staff (Me)
Access: Read only
Others: Read only

Sorry if I'm repeating myself. Just want to clarify so everything is ok so far.

//megus
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 03:41 PM
 
Double post
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 03:43 PM
 
Originally posted by megus:
Not read/write! Read only.

Here are my settings for permissions:

megus (my home-folder):
Owner: megus (Me)
Access: Read & Write
Group: Staff (Me)
Access: Read only
Others: Read only

Sites-folder:
Owner: megus (Me)
Access: Read & Write
Group: Staff (Me)
Access: Read only
Others: Read only

Sorry if I'm repeating myself. Just want to clarify so everything is ok so far.

//megus
Megus,

I set things up the same as you and that did the trick!

But I don't understand why I can't set my home folder to 'others/no access' but the sites folder to 'others/read only'

That seems to me to be the most secure.

I'll have to experiment a bit.

Many thanks anyway! :-)

Simon
     
Mac Elite
Join Date: Jul 2002
Location: Tronna
Status: Offline
Reply With Quote
Jan 13, 2003, 03:52 PM
 
Glad to see it's working! Just wait until you start adding PHP and other fun things
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 04:09 PM
 
Originally posted by megus:
Not read/write! Read only.

Here are my settings for permissions:

megus (my home-folder):
Owner: megus (Me)
Access: Read & Write
Group: Staff (Me)
Access: Read only
Others: Read only

Sites-folder:
Owner: megus (Me)
Access: Read & Write
Group: Staff (Me)
Access: Read only
Others: Read only

Sorry if I'm repeating myself. Just want to clarify so everything is ok so far.

//megus
Megus,

Sure enough, to host a site I have to expose my entire home folder, at least to 'read only'. I think that is really stupid.

I ought to be able to set my Home folder to 'others/no access' but override this for the sites folder which should be set at 'others/read only'.

Oh well...

Thanks for your help.

Simon
     
Junior Member
Join Date: Dec 2001
Location: Sweden
Status: Offline
Reply With Quote
Jan 13, 2003, 05:16 PM
 
Well, glad to hear you've got it working!

Regarding access/noaccess, see the folder hierarchy as a building with doors leading to other doors behind it. If you don't have access to one door (for instance your "home-door"). You wont even see which doors are behind it.

That said for security reasons, don't put anything at the root folder of your home-directory. Use the folders within it and you should be safe.

Instead of using your sites-folder within your home-folder. You could just use the webservers root folder at /Library/WebServer/Documents/. If you're the administrator of the machine that is.

Happy websharing!

//megus
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jan 13, 2003, 05:49 PM
 
Originally posted by megus:
Well, glad to hear you've got it working!

Happy websharing!

//megus
Megus,

Can you have a look at my new thread <http://forums.macnn.com/showthread.p...hreadid=140334>?

Still need some help...

Thanks:-)

Simon
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:10 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2