bmicallef
asked on
Real basic beginer question regarding configuration of Apache2 on Mac OS X
I've only used IIS before ... so I have NO previous knowledge regarding Apache.
I'm running Mac OS X [10.2.6 - Jaguar] and yes the pre-installed version was running just fine till I mucked things up with an update.
I set out to install the latest and greatest versions of Apache, PHP, MySQL, etc. and I got throught the initial Apache2 install and noticed I lost my ability to view folders in my user folder 'sites' directory ...
i.e. before my Apache2 install I could view this folder: http://localhost/~micalleb/testWeb/index.html
After my install I can see:
http://localhost/~micalleb/
but not:
http://localhost/~micalleb/testWeb/index.html
So I went out to edit the configuration file figuring it had something to do with this 'userdir' setting I've read about ... That's when I ran into problems.
Firstly ... I get an error when I attempt to edit and save the file ... secondly I have no idea what the syntax should be for this 'userdir' setting or even if its the right one.
My install and user paths are as follows:
<root>/library/apache2/
<root>/users/micalleb/site s/
Any help for a newbie would be greatly appritiated ...
I'm running Mac OS X [10.2.6 - Jaguar] and yes the pre-installed version was running just fine till I mucked things up with an update.
I set out to install the latest and greatest versions of Apache, PHP, MySQL, etc. and I got throught the initial Apache2 install and noticed I lost my ability to view folders in my user folder 'sites' directory ...
i.e. before my Apache2 install I could view this folder: http://localhost/~micalleb/testWeb/index.html
After my install I can see:
http://localhost/~micalleb/
but not:
http://localhost/~micalleb/testWeb/index.html
So I went out to edit the configuration file figuring it had something to do with this 'userdir' setting I've read about ... That's when I ran into problems.
Firstly ... I get an error when I attempt to edit and save the file ... secondly I have no idea what the syntax should be for this 'userdir' setting or even if its the right one.
My install and user paths are as follows:
<root>/library/apache2/
<root>/users/micalleb/site
Any help for a newbie would be greatly appritiated ...
ASKER
For me to try this I still need to edit the configuration file ... right now I get an error that I don't have permissions to edit this file ... any suggestions?
Thanks for the quick reply by the way ... it looks simple enough so far.
Thanks for the quick reply by the way ... it looks simple enough so far.
ASKER
Using pico in the terminal window I was able to edit the httpd.conf file, I then restarted my Apache server and I can now view my user directory ... kinda ...
I created a folder in my user folder called 'testWeb' and placed a file: index.html inside of it ...
I still can't view this folder or the html file.
I checked permissions through the terminal window and here is how things look:
The basic user folder ~micalleb:
ls -l
drwxr-xr-x 5 micalleb staff images
-rw-r--r-- 1 micalleb staff index.html
drwxr-xr-x 3 micalleb staff testWeb
Then I checked my file inside 'testWeb':
cd testWeb
ls -l
-rw-r--r-- 1 micalleb staff index.html
To me this looks the same but I am sure I'm overlooking something very simple here ...
I created a folder in my user folder called 'testWeb' and placed a file: index.html inside of it ...
I still can't view this folder or the html file.
I checked permissions through the terminal window and here is how things look:
The basic user folder ~micalleb:
ls -l
drwxr-xr-x 5 micalleb staff images
-rw-r--r-- 1 micalleb staff index.html
drwxr-xr-x 3 micalleb staff testWeb
Then I checked my file inside 'testWeb':
cd testWeb
ls -l
-rw-r--r-- 1 micalleb staff index.html
To me this looks the same but I am sure I'm overlooking something very simple here ...
what is the user that apache runs under?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This worked perfectly ... thanks for everyone's reply ...
the mod userdir configuration should look like this
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
That means in your homedirectory you should have a directory public_html where you can put your files. Remember that this
directory must be readable by the apache server.
david