You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by mohan devanoor <mo...@yahoo.com> on 2006/01/30 07:20:10 UTC

[users@httpd] problem with cgi permissions

hi all,
  iam an apche 2.0.55 user
  i want to get my homepages for different directories like
  http://localhost/page1   -- (hello.html)
    http://localhost/page2    --(welcome.html)
    http://localhost/page3     --(index.html)
   
  i tried using VH and Redirect
   
  <VirtualHost *:80>
ServerName vls:80
Redirect /page1 http://vls:80/page1/hello.html
  Redirect /page2 http://vls:80/page2/welcome.html
  Redirect /page3 http://vls:80/page1/index.htm
</VirtualHost>
   
  is this right and efficient way.
  i want to give cgi permissions for each directory
  i modified it by using DocumentRoot and DirectoryIndex , Execcgi. but this is not working..
  can any one help me pleae
   
   


   

		
---------------------------------
Do you Yahoo!?
 With a free 1 GB, there's more in store with Yahoo! Mail.

Re: [users@httpd] problem with cgi permissions

Posted by David Wolever <wo...@gmail.com>.
On 1/30/06, mohan devanoor <mo...@yahoo.com> wrote:
> hi all,
> iam an apche 2.0.55 user
> i want to get my homepages for different directories like
> http://localhost/page1   -- (hello.html)
>
> http://localhost/page2    --(welcome.html)
>
> http://localhost/page3     --(index.html)
>
> i tried using VH and Redirect
>
> <VirtualHost *:80>
> ServerName vls:80
> Redirect /page1 http://vls:80/page1/hello.html
> Redirect /page2 http://vls:80/page2/welcome.html
> Redirect /page3 http://vls:80/page1/index.htm
> </VirtualHost>
The way I would solve this in Apache 1.3 is by changing the DirectoryIndex:
<Location /page2>
    DirectoryIndex welcome.html
</Location>
Although this can be sort of confusing.  While I don't know your
situation, it might be better just to change welcome.html to
index.html (if you want it to be the index).
Alternately, you could use a little {perl, php, cgi} script that would
just send the "Location: " header to the browser.  For example:
index.php:
<?
header("Location: welcome.html");
?>
>
> is this right and efficien t way.
> i want to give cgi permissions for each directory
> i modified it by using DocumentRoot and DirectoryIndex , Execcgi. but this
> is not working..
> can any one help me pleae
Did you use "AddHandler" to tell Apache what extensions CGI scripts
have?  Are the scripts executible (+x)?
This seems to work fine for me:
<Location />
Options ExecCGI
AddHandler cgi-script *.cgi *.pl
</Location>
If that doesn't work, search through the config files for things
relating to the cgi-bin directory (after making sure CGI scripts work
in there, of coarse).  Try and find out what it has that other
directories don't.

Hope this helps,
David
>
>
>
>
>  ________________________________
> Do you Yahoo!?
>  With a free 1 GB, there's more in store with Yahoo! Mail.
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org