Solved

Real basic beginer question regarding configuration of Apache2 on Mac OS X

Posted on 2003-10-29
6
338 Views
Last Modified: 2011-09-20
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/sites/

Any help for a newbie would be greatly appritiated ...
0
Comment
Question by:bmicallef
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:kalosi
ID: 9643494
Hi,

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
0
 

Author Comment

by:bmicallef
ID: 9643792
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.
0
 

Author Comment

by:bmicallef
ID: 9644859
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 ...
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Expert Comment

by:kalosi
ID: 9648098
what is the user that apache runs under?
0
 
LVL 8

Accepted Solution

by:
heskyttberg earned 100 total points
ID: 9649016
Hi!

You have missed one dir.

http://localhost/~micalleb

Will in most cases on Linux resolve too:
/home/micalleb/public_html

If userdir directive looks as described by kalosi.
So do this:
cd ~micalleb
mkdir public_html
chmod 755 public_html
mv * public_html
cd public_html
chmod 755 testWeb

All done!

Now http://localhost/~micalleb/testWeb should work.

Regards
/Hasse
0
 

Author Comment

by:bmicallef
ID: 9649920
This worked perfectly ... thanks for everyone's reply ...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now