Using alias in httpd.conf to point to folder in Mac OS X

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Using alias in httpd.conf to point to folder in Mac OS X

Postby pjbluvas » 06. September 2008 07:28

I am trying to use alias to allow me to view files that aren't in my DocumentRoot directory, but I keep getting errors. Can someone help me with the code? This is on a Mac OS X.

Here is the value of DocumentRoot in httpd.conf:
/Applications/xampp/xamppfiles/htdocs

When I type the url: http://localhost here is the folder where the sample xampp php files are read from:
Applications/xampp/xamppfiles/htdocs/xampp

Here is the working directory I want to be able to read php files from:
/Users/admin/Documents/workspace/petelocal


However, when I add the following lines to httpd.conf I get an error:
alias /petelocal /Users/admin/Documents/workspace/petelocal
<Directory "/Users/admin/Documents/workspace/petelocal">
Allow from all
</Directory>


I think I am trying to use alias in the way it was intended-- to access content that does not live under the DocumentRoot. There is another post on this topic on the forum titled "Where do I put my Site Pages?" by kaththea but I can't find a good explanation to my question there.

Any comments would be greatly appreciated. Thanks!
pjbluvas
 
Posts: 6
Joined: 11. August 2008 13:30

Postby Wiedmann » 06. September 2008 11:58

I get an error

Which error?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby pjbluvas » 06. September 2008 23:26

There is no specific error message. I simply cannot start my Apache server, and the following generic error message is shown. If I comment out the alias statement I can start Apache with no errors.

XAMPP: starting Apache...
XAMPP: [1merror 1! Couldn't start Apache![m
XAMPP: [1mStarting Diagnose... [m
XAMPP: [1mSorry. I've no idea what's going wrong.[m
XAMPP: [1mPlease contact our forum http://
www.apachefriends.org/f[m
pjbluvas
 
Posts: 6
Joined: 11. August 2008 13:30

Postby Wiedmann » 07. September 2008 09:07

Something in the apachestart.log?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests