I'm developing a site with PHP
and I need to test it using my Web Server on Mac. I installed the server and made sure it's working. Localhost is seeing and serving whatever I put in /Library/WebServer/Documents
.
Now I put a test script in the CGI-Executables
directory, and tried calling it from an html
file inside the Documents
directory. It results in this error:
The requested URL /CGI-Executables/SM.php was not found on this server.
The file is there, so I'm assuming it's a configuration issue, and looking around I played with the /etc/apache2/extra/httpd-vhosts.conf
file but it seems like an overkill. I don't need a virtual host, and I'm not going to serve anything from my development machine. I just want to develop my site.
You should either put your scripts in /Library/WebServer/Documents/ or call them like /cgi-bin/SM.php Also, are you sure you want cgi scripts or do you just need your php to work? If its the latter, then putting them up in the Document root is a better option than using it as cgi script.