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 > Developer Center > Newbie Issues with Setting up Apache

Newbie Issues with Setting up Apache
Thread Tools
Grizzled Veteran
Join Date: Apr 2000
Location: New York City
Status: Offline
Reply With Quote
Aug 26, 2003, 12:18 AM
 
Hey all-

Very new to this forum, I just went through installing dev tools, compiling php, all to run phpicalendar - a prog I found on VT, anyway, when I try to connect to http://mycomputer/

I get the apache web page

when I try to connect to http://mycomputer/~myuser

I get FORBIDDEN you don't have permission to access /~myuser/ on this server.

What am I doing wrong?
iPhone 3G 16Gb
24" 2.8Ghz Core 2 Duo iMac, 4GB/320GB/256MB
12" AlBook 1Ghz/768Mb/80Gb/Combo/AX
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Aug 26, 2003, 08:49 AM
 
Originally posted by LeeG:
I get FORBIDDEN you don't have permission to access /~myuser/ on this server.

What am I doing wrong?
Probably a permissions issue. You have to make sure that your home directory, and the "Sites" directory inside it, are readable and executable by everyone.

To do this, either use the "Get Info" box on your user folder and Sites folder and use the "Ownership and Permissions" section to set "Others" to "Read-Only", or go to the Terminal and do the following:

Code:
cd /Users chmod a+rx your_user_folder cd ~/ chmod -R a+rx Sites
That should do it. Remember there is an error log for apache here:

/var/log/httpd/error_log

You can look at that to help you figure out the errors you see.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
LeeG  (op)
Grizzled Veteran
Join Date: Apr 2000
Location: New York City
Status: Offline
Reply With Quote
Aug 27, 2003, 09:51 AM
 
Yeah, fixed the permissions, that worked ok (no probs) - but still no luck, then I realized the instructions in phpicalendar which said to point the browser to <http://yourcomputer/~user/phpicalendar> were not quite correct, you need to point it to: <http://yourcomputer/~user/phpicalendar/index.php>. Supposedly there is a way to get the apache server to know that index.php is a default (I think its in the httpd.conf file) but for now I just use the longer url...thanks for the help

Lee
iPhone 3G 16Gb
24" 2.8Ghz Core 2 Duo iMac, 4GB/320GB/256MB
12" AlBook 1Ghz/768Mb/80Gb/Combo/AX
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Aug 27, 2003, 01:20 PM
 
Originally posted by LeeG:
Supposedly there is a way to get the apache server to know that index.php is a default (I think its in the httpd.conf file)
This is easily fixed. Look in /etc/httpd/httpd.conf for something like this:

Code:
<IfModule mod_dir.c> DirectoryIndex index.html </IfModule>
Change it to be like this:

Code:
<IfModule mod_dir.c> DirectoryIndex index.html index.php </IfModule>
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Registered User
Join Date: Jul 2003
Location: San Jose
Status: Offline
Reply With Quote
Aug 27, 2003, 01:21 PM
 
Originally posted by LeeG:
Supposedly there is a way to get the apache server to know that index.php is a default (I think its in the httpd.conf file) but for now I just use the longer url...thanks for the help

Lee
yeah, look for the 'DirectoryIndex' in your httpd.conf and add index.php to the end (with a space, no comma).

[php]
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
[/php]

then restart apache..
     
LeeG  (op)
Grizzled Veteran
Join Date: Apr 2000
Location: New York City
Status: Offline
Reply With Quote
Aug 27, 2003, 02:40 PM
 
and I would restart apache...how?....

(sorry, I do lots of mac stuff, but this terminal/web serving stuff i am a total newb at)

Lee
iPhone 3G 16Gb
24" 2.8Ghz Core 2 Duo iMac, 4GB/320GB/256MB
12" AlBook 1Ghz/768Mb/80Gb/Combo/AX
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Aug 27, 2003, 09:26 PM
 
Originally posted by LeeG:
and I would restart apache...how?....

(sorry, I do lots of mac stuff, but this terminal/web serving stuff i am a total newb at)
No problem, the only way to learn is to ask.

Via the GUI:

Go the Sharing PrefPane in System preferences. Uncheck Web Sharing, then check it again.

Via the command line:

Code:
sudo apachectl restart
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
LeeG  (op)
Grizzled Veteran
Join Date: Apr 2000
Location: New York City
Status: Offline
Reply With Quote
Aug 27, 2003, 09:42 PM
 
Thanks so much, you guys are great, I really appreciate the help, I AM learning (slowly!), just finished installing openoffice too..really nice software...

Thanks again,

Lee
iPhone 3G 16Gb
24" 2.8Ghz Core 2 Duo iMac, 4GB/320GB/256MB
12" AlBook 1Ghz/768Mb/80Gb/Combo/AX
     
   
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 02:20 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