cgi-bin always has 404 error
Hello
I am trying to access a cgi script via an html page. But it gives 404 error every time. Not Found The requested URL /EF="cgi-bin/test.cgi" was not found on this server. ##my html page## test.html <A HREF=EF="cgi-bin/test.cgi"> Click here to run a CGI program</A> <VirtualHost *:80> ServerName www.example.com DocumentRoot "/var/www/cgi-bin/" <Directory "/var/www/cgi-bin/"> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted </Directory> ## Logging ErrorLog "/var/log/httpd/error.log" ServerSignature Off CustomLog "/var/log/httpd/access.log" combined ## Script alias directives ScriptAlias /cgi-bin "/var/www/cgi-bin/" </VirtualHost> PS: the permissions of the html file is: -rwxr-xr-x. 1 apache apache 67 Feb 8 22:28 test.html -rwxr--r--. 1 apache apache 390 Feb 7 00:30 test.cgi also note that if I run the cgi-bin/test.cgi directly from browser,it works fine. Please help ! |
Quote:
Code:
<A HREF="cgi-bin/test.cgi"> Click here to run a CGI program</A> |
Quote:
:: EDIT :: scasey beat me to it. |
1 Attachment(s)
thanks much to both gentleman !
made changes in httpd.conf DocumentRoot "/var/www/html/test.html" <Directory "/var/www/html/"> and it works perfectly. Another help which I would like to have is: I added another cgi script in the html but the output is bit closer (both tabs) when fired from browser.Meaning I wanted to have the tabs both in vertical position with bit of space.since I need to have at-least 10-20 different CGI's with separate links that's why needed this.later I will try to make the looks of that page look bit attractive by reading blogs or steps. sorry for the ask but this is really killing me. cat test.html <A HREF="cgi-bin/test.cgi"> Click here to run a CGI program</A> <A HREF="cgi-bin/test2.cgi"> nova listing of VM</A> |
Put each anchor tag in paragraph <p> tags
Or Separate them with <br> tags Please search for “html syntax” |
thanks to both of you.
closing this thread ! |
All times are GMT -5. The time now is 02:12 AM. |