NYCPHP Meetup

NYPHP.org

[nycphp-talk] Setting up permissions on Apache 2.0.45 with Win2K and Virtual Host

Ian Forsyth ian at plusfour.org
Tue Apr 22 15:13:32 EDT 2003



On Tuesday, April 22, 2003, at 10:42 AM, soazine at pop.erols.com wrote:

> A friend of mine wants to know the answer to this, and since my Apache
> setup on Win2K doesn't involve virtual host domains, I couldn't help 
> him.
> Anyone out there might know?
>
> Thanx
>
> quick question about the apache on win2K :
> I can't access the cgi-bin folder...

You need to add ScriptAlias to the httpd.conf and some directory 
parameters..

Do a search in your existing httpd.conf file for ScriptAlias. I have 
copied config info from my httpd.conf, I am running 1.3.27 version of 
apache.

>
> here's the setup:
>
> d:\\www\\apache\\apache2\\htdocs\\downtown\\cgi-bin (for the client)

I am just guessing, but the virtual host should look something like.. 
Just add the ScriptAlias info into the virtual host tags

<VirtualHost downtown.com>
DocumentRoot "d:/www/apache/apache2/htdocs/downtown"
ServerName "downtown.com"


     # ScriptAlias: This controls which directories contain server 
scripts.
     # ScriptAliases are essentially the same as Aliases, except that
     # documents in the realname directory are treated as applications 
and
     # run by the server when requested rather than as documents sent to 
the client.
     # The same rules about trailing "/" apply to ScriptAlias directives 
as to
     # Alias.
     #
     ScriptAlias /cgi-bin/ 
"d:/www/apache/apache2/htdocs/downtown/cgi-bin"

     # CGI directory exists, if you have that configured.
     #
     <Directory "d:/www/apache/apache2/htdocs/downtown/cgi-bin">
         AllowOverride None
         Options None
         Order allow,deny
         Allow from all
     </Directory>
</VirtualHost>

> d:\\www\\apache\\apache2\\cgi-bin

This would be the default server config info. If you did not added the 
ScriptAlias Directive to the VirtualHost, any 
http://servername/cgi-bin/ will resolve to the default server config.

     # ScriptAlias: This controls which directories contain server 
scripts.
     # ScriptAliases are essentially the same as Aliases, except that
     # documents in the realname directory are treated as applications 
and
     # run by the server when requested rather than as documents sent to 
the client.
     # The same rules about trailing "/" apply to ScriptAlias directives 
as to
     # Alias.
     #
     ScriptAlias /cgi-bin/ "d:/www/apache/apache2/cgi-bin"

     # CGI directory exists, if you have that configured.
     #
     <Directory "d:/www/apache/apache2/cgi-bin">
         AllowOverride None
         Options None
         Order allow,deny
         Allow from all
     </Directory>

note the forward slashes..
>
> virtual host runs into the downtown-folder. both cgi-bin folders have
> htaccess in it, but when i open the browser i get he message:
>
> http://virtualhost/cgi-bin/
> forbidden, you don't have permission to access /cgi-bin/ on this server
>
> <= i assume that that's why I can't run the scripts either...
>
> any suggestions ???
>
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
>
>
>
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
>




More information about the talk mailing list