rascal
asked on
Page not found in cgi-bin directory
I'm not that familiar with apache web server environments, so am at a loss here - I have placed a file called test.php in the site's cgi-bin directory, but when I try to access the page I get a page not found.
http://www.mydomain.com/cgi-bin/test.php
Is this because you can't directly access pages in a cgi-bin directory on Apache? Even if you explicitly point to the page?
http://www.mydomain.com/cgi-bin/test.php
Is this because you can't directly access pages in a cgi-bin directory on Apache? Even if you explicitly point to the page?
how is your server configured?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ozo: I can put phpinfo.php on the site and run that to get various details of the web host (it's not my own web server, it's a shared server plan).
Nopius: I understood the first part of your message about how cgi-bin can be an alias so I could never access that page, but the second part of your note lost me. If my FTP can post the file test.php to that cgi-bin directory, shouldn't I be able to run it from the http line in my browser?
Nopius: I understood the first part of your message about how cgi-bin can be an alias so I could never access that page, but the second part of your note lost me. If my FTP can post the file test.php to that cgi-bin directory, shouldn't I be able to run it from the http line in my browser?
> If my FTP can post the file test.php to that cgi-bin directory, shouldn't I be able to run it from the http line in my browser?
In case of server-wide aliased /cgi-bin you can see your folder by FTP, but not via HTTP. There is no way to redefine server-wide alias in .htaccess file (but this can be done for your virtual host in server config file)
You may change directory name to something different, say /cgi and configure your /cgi/.htaccess to allow CGI execution there. It can be done with 'Option +ExecCGI' and 'SetHandler cgi-script'.
Of course you should change all HTML pages that refer to /cgi-bin to point to /cgi
In case of server-wide aliased /cgi-bin you can see your folder by FTP, but not via HTTP. There is no way to redefine server-wide alias in .htaccess file (but this can be done for your virtual host in server config file)
You may change directory name to something different, say /cgi and configure your /cgi/.htaccess to allow CGI execution there. It can be done with 'Option +ExecCGI' and 'SetHandler cgi-script'.
Of course you should change all HTML pages that refer to /cgi-bin to point to /cgi