/Library/Apache2/htdocs/

jsn

Registered
Hi all

I am tryng to open a page in my localhost: http://localhost/~jsn/test.php

but by default Apache read in: /Library/Apache2/htdocs/

and get the following error messagel;
The requested URL /~jsn/test.php was not found on this server.

how can I fix is?
 
I fixed it modifying the Directory line in the httpd.conf in /usr/local/apache2/conf

now when open the test.php file, it shows the source code?
<?php
phpinfo();
?>

why?

jsn
 
You need to add the appropriate php modules to the httpd.conf... it differs depending on where you've got php installed, but http://www.entropy.ch has great information on it. I used his php5 package and it works great, but he's also got information on how to compile and configure it yourself, so you could probably find the help you need there.
 
ElDiabloConCaca said:
Edit Apache 2's .conf file to point to that directory instead of the /Library/Apache2/htdocs directory.
That's not the problem.
The problem is that user-directories hasn't been activated.
Or that the file has been placed in the wrong place.

The location of the htdocs folder tells me that Serverlogistics Apache2 has been installed. By default, it hasn't activated the user-directories. The appropriate lines between 406-427 in /Library/Apache2/conf/httpd.conf need to un-commented and modifed.
 
What do you modify?
Do I have to change anything?
Ever since I installed this version the ~username accounts don't work.
thanks so much,
John
the comment code is:
<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit Indexes
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>
 
Back
Top