You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Subzero <su...@spiderweb.tk> on 2003/01/28 10:13:06 UTC

[users@httpd] VirtualDirectory

Hi

I have created a VirtualDirectory in the conf file.
The virtualdir is a folder in the cgi-bin, but when i surf to my newly created virtualdirectory, i see the .pl file i am accessing as plain text.. 
Everything works fine as long as i access that file by it's 'real' url, but when i uses the virtual dir, i just see it as plain text, but i do see the correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i guess.
i have added this folder in the scriptalias setting too.. but it didn't help me.. i guess i really shouldn't need to add it there either, since i already have the cgi-bin there and the folder i have in my vitrualdir is a subfolder of cgi-bin

I have read through the FAQ about this and did just as it said, but i still won't get it working..
Any ideas on what i am doing wrong or what i have missed?

/Subzero

Re: [users@httpd] VirtualDirectory

Posted by BAO RuiXian <ba...@atbusiness.com>.
Hello, Subzero,


> <VirtualHost *>
>     ServerAdmin webmaster@dir.domain.com
>     DocumentRoot "C:/Program Files/Apache Group/Apache/cgi-bin/dir/"
>     ServerName dir.domain.com
>     ErrorLog logs/dir.domain.com-error_log
>     CustomLog logs/dir.domain.com-access_log common
> </VirtualHost>
>
> As i said,
> http://www.domain.com/cgi-bin/dir works
> http://dir.domain.com shows me the correct .pl file, but it doesn't process

When you type http://dir.domain.com, the ScriptAlias /cgi-bin/dir is not called,
so it won't work. To make it work, I guess you also need to add a directive
AddHandler cgi-script .pl into your second VH or the following <Directory
".../cgi-bin/dir>..</Directory> pair.

Best

Bao

>
> it, it types it as a txt file
>
> i have also tried having this
>
>     ScriptAlias /cgi-bin/dir/ "C:/Program Files/Apache
> Group/Apache/cgi-bin/dir/"
>
>     <Directory "C:/Program Files/Apache Group/Apache/cgi-bin/dir">
>         AllowOverride None
>         Options ExecCGI
>         Order allow,deny
>         Allow from all
>     </Directory>
>
> But it doesn't help
> Please someone tell me what i am doing wrong

--
BAO RuiXian,  SOFTWARE ENGINEER,   Project Consulting,  Software Services
AtBusiness Communications Corporation, Kaapeliaukio 1, FIN-00180 Helsinki
Telephone +358-9-2311 6674, Mobile +358-50-329 6275, Fax +358-9-2311 6601
Web: www.atbusiness.com, Email: {bao.ruixian, ruixian.bao}@atbusiness.com



---------------------------------------------------------------------
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


Re: [users@httpd] VirtualDirectory

Posted by Subzero <su...@spiderweb.tk>.
----- Original Message -----
From: "J. Greenlees" <ja...@shaw.ca>
To: <us...@httpd.apache.org>
Sent: Wednesday, January 29, 2003 1:03 PM
Subject: Re: [users@httpd] VirtualDirectory


> Subzero wrote:
> > This is the stuff about the VirtualDir that i have in my httpd.conf
> >
> > NameVirtualHost *
> >
> > <VirtualHost *>
> >     ServerAdmin webmaster@domain.com
> >     DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/"
> >     ServerName www.domain.com
> >     ErrorLog logs/error_log
> >     CustomLog logs/access_log common
> > </VirtualHost>
> >
> > <VirtualHost *>
> >     ServerAdmin webmaster@dir.domain.com
> >     DocumentRoot "C:/Program Files/Apache Group/Apache/cgi-bin/dir/"
> >     ServerName dir.domain.com
> >     ErrorLog logs/dir.domain.com-error_log
> >     CustomLog logs/dir.domain.com-access_log common
> > </VirtualHost>
> >
> instead of virtualhost * try with the name you want it to be.
> ( http://dir.domain.com )
> though setting your cgi dir up as a virtual host seems odd. it isn't
needed

I have tried changing virtualhost * with dir.domain.com but that only made
apache output the homepage from the default host (www.domain.com instead of
dir.domain.com).. it has to do with the order of which i have defined the
virtualhosts or something.. the first one is the default.. donät remember
exactly what it said in the help about vhosts, but it didn't work..
it is needed to setup that dir in the cgi dir (cgi-bin/dir/) as a vhost if i
want it as a vhost.. i want dir.domain.com instead of
www.domain.com/cgi-bin/dir/ so then i must use a vhost.. right?

> > As i said,
> > http://www.domain.com/cgi-bin/dir works
> > http://dir.domain.com shows me the correct .pl file, but it doesn't
process
> > it, it types it as a txt file
> >
> > i have also tried having this
> >
> >
> >
> >     <Directory "C:/Program Files/Apache Group/Apache/cgi-bin/dir">
> >         AllowOverride None
> >         Options ExecCGI
> >         Order allow,deny
> >         Allow from all
> >     </Directory>
> >
> ScriptAlias /cgi-bin/dir/ "C:/Program Files/Apache
> Group/Apache/cgi-bin/dir/"
>
> try scriptalias after you have defined the directory. instead of before.

just tried this one.. no luck.. it still doesn't process the .pl file :(



---------------------------------------------------------------------
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


Re: [users@httpd] VirtualDirectory

Posted by "J. Greenlees" <ja...@shaw.ca>.
Subzero wrote:
> This is the stuff about the VirtualDir that i have in my httpd.conf
> 
> NameVirtualHost *
> 
> <VirtualHost *>
>     ServerAdmin webmaster@domain.com
>     DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/"
>     ServerName www.domain.com
>     ErrorLog logs/error_log
>     CustomLog logs/access_log common
> </VirtualHost>
> 
> <VirtualHost *>
>     ServerAdmin webmaster@dir.domain.com
>     DocumentRoot "C:/Program Files/Apache Group/Apache/cgi-bin/dir/"
>     ServerName dir.domain.com
>     ErrorLog logs/dir.domain.com-error_log
>     CustomLog logs/dir.domain.com-access_log common
> </VirtualHost>
> 
instead of virtualhost * try with the name you want it to be.
( http://dir.domain.com )
though setting your cgi dir up as a virtual host seems odd. it isn't needed
> As i said,
> http://www.domain.com/cgi-bin/dir works
> http://dir.domain.com shows me the correct .pl file, but it doesn't process
> it, it types it as a txt file
> 
> i have also tried having this
> 
> 
> 
>     <Directory "C:/Program Files/Apache Group/Apache/cgi-bin/dir">
>         AllowOverride None
>         Options ExecCGI
>         Order allow,deny
>         Allow from all
>     </Directory>
> 
ScriptAlias /cgi-bin/dir/ "C:/Program Files/Apache
Group/Apache/cgi-bin/dir/"

try scriptalias after you have defined the directory. instead of before.


---------------------------------------------------------------------
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


RE: [users@httpd] VirtualDirectory

Posted by Jeff Cohen <ap...@gej-it.com>.
Thanks Zac, with a bit of changes and customization I solved my problem, now
I'll customize the directives for him and send it to him.

Jeff Cohen

> -----Original Message-----
> From: Zac Stevens [mailto:zts@cryptocracy.com]
> Sent: Wednesday, January 29, 2003 9:27 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] VirtualDirectory
> 
> On Thu, Jan 30, 2003 at 12:56:11AM +0100, Subzero wrote:
> > I can't run the script from the cgi-bin dir itself.. itäs a ikonboard
> forum
> > that i am trying to make the VirtualDrectory for.. instead of
> > www.domain.com/cgi-bin/ikonboard/ i want forum.domain.com..
> > So, i need to have the ikonboard.pl file in the cgi-bin/ikonboard/ dir..
> > but the wierd thing is, that when i use www.domain.com/cgi-
> bin/ikonboard/ it
> > works perfect and when i use forum.domain.com it doesn't process the
> file..
> 
> This thread seems to be a little bit confused, but I'll throw my 2 cents
> in
> and hope I don't muddy the waters further :)
> 
> First, a quick note - there is no such thing as a "VirtualDirectory" in
> Apache.  I understand this to be an IIS term roughly equivalent to
> Apache's
> 'Alias', but that doesn't really make sense in the context you're using
> it.
> 
> Now, there's two ways of solving the problem at hand.  The first is using
> VirtualHosts, while the second uses mod_rewrite.  I don't use mod_rewrite
> much, so I tend to use VHosts in this situation.
> 
> Generally speaking, I would not create a VHost whose DocumentRoot was
> located underneath another VHost's DocumentRoot.  It is conceptually
> simpler to be able to see a VirtualHost as an entirely separate entity in
> its own right.  eg,
> 
> # main server
> C:\Program Files\Apache Group\Apache\htdocs
> C:\Program Files\Apache Group\Apache\cgi-bin
> # forums
> C:\Program Files\Apache Group\Apache\forum\htdocs
> C:\Program Files\Apache Group\Apache\forum\cgi-bin
> 
> ...and so on.  In your case, where you need a VirtualHost to run a single
> CGI (more or less), a separate cgi-bin is not required.  I think something
> along the lines of the following would probably work:
> 
> <VirtualHost *>
>    ServerName dir.domain.com
>    ServerAdmin webmaster@dir.domain.com
> 
>    DocumentRoot "C:/Program Files/Apache Group/Apache/forum/"
> 
>    ErrorLog logs/dir.domain.com-error_log
>    CustomLog logs/dir.domain.com-access_log common
> 
>    <Directory "C:/Program Files/Apache Group/Apache/forum/">
> 	Options -Indexes +ExecCGI
> 	AddHandler cgi-script .pl
>    </Directory>
> </VirtualHost>
> 
> You would then put the ikonboard files into the path specified as the
> DocumentRoot above.
> 
> That's the VirtualHosting option.
> 
> As for mod_rewrite, you would keep a single VirtualHost and add a
> ServerAlias for 'dir.domain.com'.  Then you would need a couple of rules
> to
> proxy requests for http://dir.domain.com/ to
> http://www.domain.com/cgi-bin/ikonboard/ - the documentation for
> mod_rewrite includes a number of good examples, so if you're interested in
> going down this path you can probably find something there.
> 
> 
> Zac
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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


Re: [users@httpd] VirtualDirectory

Posted by Zac Stevens <zt...@cryptocracy.com>.
On Thu, Jan 30, 2003 at 12:56:11AM +0100, Subzero wrote:
> I can't run the script from the cgi-bin dir itself.. itäs a ikonboard forum
> that i am trying to make the VirtualDrectory for.. instead of
> www.domain.com/cgi-bin/ikonboard/ i want forum.domain.com..
> So, i need to have the ikonboard.pl file in the cgi-bin/ikonboard/ dir..
> but the wierd thing is, that when i use www.domain.com/cgi-bin/ikonboard/ it
> works perfect and when i use forum.domain.com it doesn't process the file..

This thread seems to be a little bit confused, but I'll throw my 2 cents in
and hope I don't muddy the waters further :)

First, a quick note - there is no such thing as a "VirtualDirectory" in
Apache.  I understand this to be an IIS term roughly equivalent to Apache's
'Alias', but that doesn't really make sense in the context you're using it.

Now, there's two ways of solving the problem at hand.  The first is using
VirtualHosts, while the second uses mod_rewrite.  I don't use mod_rewrite
much, so I tend to use VHosts in this situation.

Generally speaking, I would not create a VHost whose DocumentRoot was
located underneath another VHost's DocumentRoot.  It is conceptually
simpler to be able to see a VirtualHost as an entirely separate entity in
its own right.  eg,

# main server
C:\Program Files\Apache Group\Apache\htdocs
C:\Program Files\Apache Group\Apache\cgi-bin
# forums
C:\Program Files\Apache Group\Apache\forum\htdocs
C:\Program Files\Apache Group\Apache\forum\cgi-bin

...and so on.  In your case, where you need a VirtualHost to run a single
CGI (more or less), a separate cgi-bin is not required.  I think something
along the lines of the following would probably work:

<VirtualHost *>
   ServerName dir.domain.com
   ServerAdmin webmaster@dir.domain.com

   DocumentRoot "C:/Program Files/Apache Group/Apache/forum/"

   ErrorLog logs/dir.domain.com-error_log
   CustomLog logs/dir.domain.com-access_log common

   <Directory "C:/Program Files/Apache Group/Apache/forum/">
	Options -Indexes +ExecCGI
	AddHandler cgi-script .pl
   </Directory>
</VirtualHost>

You would then put the ikonboard files into the path specified as the
DocumentRoot above.

That's the VirtualHosting option.

As for mod_rewrite, you would keep a single VirtualHost and add a 
ServerAlias for 'dir.domain.com'.  Then you would need a couple of rules to
proxy requests for http://dir.domain.com/ to
http://www.domain.com/cgi-bin/ikonboard/ - the documentation for
mod_rewrite includes a number of good examples, so if you're interested in
going down this path you can probably find something there.


Zac

---------------------------------------------------------------------
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


Re: [users@httpd] VirtualDirectory

Posted by Subzero <su...@spiderweb.tk>.
I did this on 1.3.24 so it doesn't work..
i installed 2.0.44 today, hoping it would work, but it didn't..

I can't run the script from the cgi-bin dir itself.. itäs a ikonboard forum
that i am trying to make the VirtualDrectory for.. instead of
www.domain.com/cgi-bin/ikonboard/ i want forum.domain.com..
So, i need to have the ikonboard.pl file in the cgi-bin/ikonboard/ dir..
but the wierd thing is, that when i use www.domain.com/cgi-bin/ikonboard/ it
works perfect and when i use forum.domain.com it doesn't process the file..

What is the best, 1.3.x or 2.0.44 ??
And what is the difference between the two?

I will try and figure out how to make this work, but i doubt i'll get it
right since i'm definately no expert on Apache :)


----- Original Message -----
From: "Jeff Cohen" <ap...@gej-it.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, January 29, 2003 1:34 PM
Subject: RE: [users@httpd] VirtualDirectory


OK, I've tried all known options on my machine (Win2k Apache 2.0.44) and it
seems that I cannot make the directory to execute the .pl script.
The script will run with the route straight to it, but DirectoryIndex will
not work on the ScriptAlias directory.
I think that in 1.3.x it could be done at the way I mentioned before, can
anyone correct me if I'm wrong please?

My suggestion to you is to try running the script from the cgi-bin directory
itself to try running it from there as a solution, unless somebody in the
list will keep this thread open and help you and me to figure this thing
out.
I guess if nobody will respond to it, it means it's a bug and should be
reported to the development team.

All the best,
Jeff Cohen

> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
> Sent: Wednesday, January 29, 2003 6:26 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] VirtualDirectory
>
> This is the stuff about the VirtualDir that i have in my httpd.conf
>
> NameVirtualHost *
>
> <VirtualHost *>
>     ServerAdmin webmaster@domain.com
>     DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/"
>     ServerName www.domain.com
>     ErrorLog logs/error_log
>     CustomLog logs/access_log common
> </VirtualHost>
>
> <VirtualHost *>
>     ServerAdmin webmaster@dir.domain.com
>     DocumentRoot "C:/Program Files/Apache Group/Apache/cgi-bin/dir/"
>     ServerName dir.domain.com
>     ErrorLog logs/dir.domain.com-error_log
>     CustomLog logs/dir.domain.com-access_log common
> </VirtualHost>
>
> As i said,
> http://www.domain.com/cgi-bin/dir works
> http://dir.domain.com shows me the correct .pl file, but it doesn't
> process
> it, it types it as a txt file
>
> i have also tried having this
>
>     ScriptAlias /cgi-bin/dir/ "C:/Program Files/Apache
> Group/Apache/cgi-bin/dir/"
>
>     <Directory "C:/Program Files/Apache Group/Apache/cgi-bin/dir">
>         AllowOverride None
>         Options ExecCGI
>         Order allow,deny
>         Allow from all
>     </Directory>
>
> But it doesn't help
> Please someone tell me what i am doing wrong
>
> /Subzero
>
> ----- Original Message -----
> From: "Jeff Cohen" <ap...@gej-it.com>
>
> Let's say you want your scripts to be served at
> www.domain1.com/cgi-bin/dir/script.pl, k?
> Then you configure at the conf file like that:
>
> ScriptAlias /cgi-bin/dir/ "/path/to/dir/"
>
> And than you add the <Directory /path/to/dir> directives.
>
> It's that simple.
> All the best,
> Jeff Cohen
>
> > -----Original Message-----
> > From: Subzero [mailto:subzero@spiderweb.tk]
> >
> > Ok, i have done both of them.. one VitrualDirectory and then i got the
> > problem with the .pl file not being processed by apache, so i added a
> > ScriptAlias for that same folder aswell, and i also added that .pl file
> as
> > an index file, so i wouldnät have to type the filename when going to
> that
> > folder..
> > but, i will remove the virtualdirectory and keep the scriptalias.. but
> if
> > i
> > only have the scriptalias, how will i get blabla.blabla.bla working?..
> >
> > /Subzero
> >
> >
> > ----- Original Message -----
> > From: "Jeff Cohen" <ap...@gej-it.com>
>
> > Hi Subzero,
> >
> > You should delete the "VirtualDirectory" directive you have set up on
> your
> > conf file and add the directory as "ScriptAlias", check how is the cgi-
> bin
> > directory is configured and copy its directives, than change the route
> to
> > the folder.
> >
> > Hint: the cgi-bin folder have ExecCGI option on its directives.
> >
> > All the best,
> > Jeff Cohen
> >
> > -----Original Message-----
> > From: Subzero [mailto:subzero@spiderweb.tk]
> >
> > Hi
> >
> > I have created a VirtualDirectory in the conf file.
> > The virtualdir is a folder in the cgi-bin, but when i surf to my newly
> > created virtualdirectory, i see the .pl file i am accessing as plain
> > text..
> > Everything works fine as long as i access that file by it's 'real' url,
> > but
> > when i uses the virtual dir, i just see it as plain text, but i do see
> the
> > correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i
> > guess.
> > i have added this folder in the scriptalias setting too.. but it didn't
> > help
> > me.. i guess i really shouldn't need to add it there either, since i
> > already
> > have the cgi-bin there and the folder i have in my vitrualdir is a
> > subfolder
> > of cgi-bin
> >
> > I have read through the FAQ about this and did just as it said, but i
> > still
> > won't get it working..
> > Any ideas on what i am doing wrong or what i have missed?
> >
> > /Subzero
>
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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




---------------------------------------------------------------------
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


RE: [users@httpd] VirtualDirectory

Posted by Jeff Cohen <ap...@gej-it.com>.
OK, I've tried all known options on my machine (Win2k Apache 2.0.44) and it
seems that I cannot make the directory to execute the .pl script.
The script will run with the route straight to it, but DirectoryIndex will
not work on the ScriptAlias directory.
I think that in 1.3.x it could be done at the way I mentioned before, can
anyone correct me if I'm wrong please?

My suggestion to you is to try running the script from the cgi-bin directory
itself to try running it from there as a solution, unless somebody in the
list will keep this thread open and help you and me to figure this thing
out.
I guess if nobody will respond to it, it means it's a bug and should be
reported to the development team.

All the best,
Jeff Cohen

> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
> Sent: Wednesday, January 29, 2003 6:26 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] VirtualDirectory
> 
> This is the stuff about the VirtualDir that i have in my httpd.conf
> 
> NameVirtualHost *
> 
> <VirtualHost *>
>     ServerAdmin webmaster@domain.com
>     DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/"
>     ServerName www.domain.com
>     ErrorLog logs/error_log
>     CustomLog logs/access_log common
> </VirtualHost>
> 
> <VirtualHost *>
>     ServerAdmin webmaster@dir.domain.com
>     DocumentRoot "C:/Program Files/Apache Group/Apache/cgi-bin/dir/"
>     ServerName dir.domain.com
>     ErrorLog logs/dir.domain.com-error_log
>     CustomLog logs/dir.domain.com-access_log common
> </VirtualHost>
> 
> As i said,
> http://www.domain.com/cgi-bin/dir works
> http://dir.domain.com shows me the correct .pl file, but it doesn't
> process
> it, it types it as a txt file
> 
> i have also tried having this
> 
>     ScriptAlias /cgi-bin/dir/ "C:/Program Files/Apache
> Group/Apache/cgi-bin/dir/"
> 
>     <Directory "C:/Program Files/Apache Group/Apache/cgi-bin/dir">
>         AllowOverride None
>         Options ExecCGI
>         Order allow,deny
>         Allow from all
>     </Directory>
> 
> But it doesn't help
> Please someone tell me what i am doing wrong
> 
> /Subzero
> 
> ----- Original Message -----
> From: "Jeff Cohen" <ap...@gej-it.com>
> 
> Let's say you want your scripts to be served at
> www.domain1.com/cgi-bin/dir/script.pl, k?
> Then you configure at the conf file like that:
> 
> ScriptAlias /cgi-bin/dir/ "/path/to/dir/"
> 
> And than you add the <Directory /path/to/dir> directives.
> 
> It's that simple.
> All the best,
> Jeff Cohen
> 
> > -----Original Message-----
> > From: Subzero [mailto:subzero@spiderweb.tk]
> >
> > Ok, i have done both of them.. one VitrualDirectory and then i got the
> > problem with the .pl file not being processed by apache, so i added a
> > ScriptAlias for that same folder aswell, and i also added that .pl file
> as
> > an index file, so i wouldnät have to type the filename when going to
> that
> > folder..
> > but, i will remove the virtualdirectory and keep the scriptalias.. but
> if
> > i
> > only have the scriptalias, how will i get blabla.blabla.bla working?..
> >
> > /Subzero
> >
> >
> > ----- Original Message -----
> > From: "Jeff Cohen" <ap...@gej-it.com>
> 
> > Hi Subzero,
> >
> > You should delete the "VirtualDirectory" directive you have set up on
> your
> > conf file and add the directory as "ScriptAlias", check how is the cgi-
> bin
> > directory is configured and copy its directives, than change the route
> to
> > the folder.
> >
> > Hint: the cgi-bin folder have ExecCGI option on its directives.
> >
> > All the best,
> > Jeff Cohen
> >
> > -----Original Message-----
> > From: Subzero [mailto:subzero@spiderweb.tk]
> >
> > Hi
> >
> > I have created a VirtualDirectory in the conf file.
> > The virtualdir is a folder in the cgi-bin, but when i surf to my newly
> > created virtualdirectory, i see the .pl file i am accessing as plain
> > text..
> > Everything works fine as long as i access that file by it's 'real' url,
> > but
> > when i uses the virtual dir, i just see it as plain text, but i do see
> the
> > correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i
> > guess.
> > i have added this folder in the scriptalias setting too.. but it didn't
> > help
> > me.. i guess i really shouldn't need to add it there either, since i
> > already
> > have the cgi-bin there and the folder i have in my vitrualdir is a
> > subfolder
> > of cgi-bin
> >
> > I have read through the FAQ about this and did just as it said, but i
> > still
> > won't get it working..
> > Any ideas on what i am doing wrong or what i have missed?
> >
> > /Subzero
> 
> 
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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


Re: [users@httpd] VirtualDirectory

Posted by Subzero <su...@spiderweb.tk>.
This is the stuff about the VirtualDir that i have in my httpd.conf

NameVirtualHost *

<VirtualHost *>
    ServerAdmin webmaster@domain.com
    DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs/"
    ServerName www.domain.com
    ErrorLog logs/error_log
    CustomLog logs/access_log common
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@dir.domain.com
    DocumentRoot "C:/Program Files/Apache Group/Apache/cgi-bin/dir/"
    ServerName dir.domain.com
    ErrorLog logs/dir.domain.com-error_log
    CustomLog logs/dir.domain.com-access_log common
</VirtualHost>

As i said,
http://www.domain.com/cgi-bin/dir works
http://dir.domain.com shows me the correct .pl file, but it doesn't process
it, it types it as a txt file

i have also tried having this

    ScriptAlias /cgi-bin/dir/ "C:/Program Files/Apache
Group/Apache/cgi-bin/dir/"

    <Directory "C:/Program Files/Apache Group/Apache/cgi-bin/dir">
        AllowOverride None
        Options ExecCGI
        Order allow,deny
        Allow from all
    </Directory>

But it doesn't help
Please someone tell me what i am doing wrong

/Subzero

----- Original Message -----
From: "Jeff Cohen" <ap...@gej-it.com>

Let's say you want your scripts to be served at
www.domain1.com/cgi-bin/dir/script.pl, k?
Then you configure at the conf file like that:

ScriptAlias /cgi-bin/dir/ "/path/to/dir/"

And than you add the <Directory /path/to/dir> directives.

It's that simple.
All the best,
Jeff Cohen

> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
>
> Ok, i have done both of them.. one VitrualDirectory and then i got the
> problem with the .pl file not being processed by apache, so i added a
> ScriptAlias for that same folder aswell, and i also added that .pl file as
> an index file, so i wouldnät have to type the filename when going to that
> folder..
> but, i will remove the virtualdirectory and keep the scriptalias.. but if
> i
> only have the scriptalias, how will i get blabla.blabla.bla working?..
>
> /Subzero
>
>
> ----- Original Message -----
> From: "Jeff Cohen" <ap...@gej-it.com>

> Hi Subzero,
>
> You should delete the "VirtualDirectory" directive you have set up on your
> conf file and add the directory as "ScriptAlias", check how is the cgi-bin
> directory is configured and copy its directives, than change the route to
> the folder.
>
> Hint: the cgi-bin folder have ExecCGI option on its directives.
>
> All the best,
> Jeff Cohen
>
> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
>
> Hi
>
> I have created a VirtualDirectory in the conf file.
> The virtualdir is a folder in the cgi-bin, but when i surf to my newly
> created virtualdirectory, i see the .pl file i am accessing as plain
> text..
> Everything works fine as long as i access that file by it's 'real' url,
> but
> when i uses the virtual dir, i just see it as plain text, but i do see the
> correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i
> guess.
> i have added this folder in the scriptalias setting too.. but it didn't
> help
> me.. i guess i really shouldn't need to add it there either, since i
> already
> have the cgi-bin there and the folder i have in my vitrualdir is a
> subfolder
> of cgi-bin
>
> I have read through the FAQ about this and did just as it said, but i
> still
> won't get it working..
> Any ideas on what i am doing wrong or what i have missed?
>
> /Subzero



---------------------------------------------------------------------
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


Re: [users@httpd] VirtualDirectory

Posted by Subzero <su...@spiderweb.tk>.
Yes, that part is no problem..
But you said i should remove the VirtualDirectory stuff for that dir, how
can i make http://dir.domain.com point to http://www.domain.com/cgi-bin/dir/
?

If i use the url http://www.domain.com/cgi-bin/dir/ it works just fine. But
when i add the VirtualDirectory for that folder and use the url
http://dir.domain.com then the VirtualDirectory works, but it doesn't
process the file, but http://www.domain.com/cgi-bin/dir/ Still works fine..
And you told me to remove the VirtualDirectory settings for that folder, how
can i then be able to access that folder by using http://dir.domain.com ??

/Subzero

----- Original Message -----
From: "Jeff Cohen" <ap...@gej-it.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, January 29, 2003 5:00 AM
Subject: RE: [users@httpd] VirtualDirectory


Let's say you want your scripts to be served at
www.domain1.com/cgi-bin/dir/script.pl, k?
Then you configure at the conf file like that:

ScriptAlias /cgi-bin/dir/ "/path/to/dir/"

And than you add the <Directory /path/to/dir> directives.

It's that simple.
All the best,
Jeff Cohen

> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
> Sent: Tuesday, January 28, 2003 7:02 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] VirtualDirectory
>
> Ok, i have done both of them.. one VitrualDirectory and then i got the
> problem with the .pl file not being processed by apache, so i added a
> ScriptAlias for that same folder aswell, and i also added that .pl file as
> an index file, so i wouldnät have to type the filename when going to that
> folder..
> but, i will remove the virtualdirectory and keep the scriptalias.. but if
> i
> only have the scriptalias, how will i get blabla.blabla.bla working?..
>
> /Subzero
>
>
> ----- Original Message -----
> From: "Jeff Cohen" <ap...@gej-it.com>
> To: <us...@httpd.apache.org>
> Sent: Tuesday, January 28, 2003 9:17 PM
> Subject: RE: [users@httpd] VirtualDirectory
>
>
> Hi Subzero,
>
> You should delete the "VirtualDirectory" directive you have set up on your
> conf file and add the directory as "ScriptAlias", check how is the cgi-bin
> directory is configured and copy its directives, than change the route to
> the folder.
>
> Hint: the cgi-bin folder have ExecCGI option on its directives.
>
> All the best,
> Jeff Cohen
>
> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
> Sent: Tuesday, January 28, 2003 4:13 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] VirtualDirectory
>
> Hi
>
> I have created a VirtualDirectory in the conf file.
> The virtualdir is a folder in the cgi-bin, but when i surf to my newly
> created virtualdirectory, i see the .pl file i am accessing as plain
> text..
> Everything works fine as long as i access that file by it's 'real' url,
> but
> when i uses the virtual dir, i just see it as plain text, but i do see the
> correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i
> guess.
> i have added this folder in the scriptalias setting too.. but it didn't
> help
> me.. i guess i really shouldn't need to add it there either, since i
> already
> have the cgi-bin there and the folder i have in my vitrualdir is a
> subfolder
> of cgi-bin
>
> I have read through the FAQ about this and did just as it said, but i
> still
> won't get it working..
> Any ideas on what i am doing wrong or what i have missed?
>
> /Subzero
>
>
> ---------------------------------------------------------------------
> 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
>
>
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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




---------------------------------------------------------------------
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


RE: [users@httpd] VirtualDirectory

Posted by Jeff Cohen <ap...@gej-it.com>.
Let's say you want your scripts to be served at
www.domain1.com/cgi-bin/dir/script.pl, k?
Then you configure at the conf file like that:

ScriptAlias /cgi-bin/dir/ "/path/to/dir/"

And than you add the <Directory /path/to/dir> directives.

It's that simple.
All the best,
Jeff Cohen

> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
> Sent: Tuesday, January 28, 2003 7:02 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] VirtualDirectory
> 
> Ok, i have done both of them.. one VitrualDirectory and then i got the
> problem with the .pl file not being processed by apache, so i added a
> ScriptAlias for that same folder aswell, and i also added that .pl file as
> an index file, so i wouldnät have to type the filename when going to that
> folder..
> but, i will remove the virtualdirectory and keep the scriptalias.. but if
> i
> only have the scriptalias, how will i get blabla.blabla.bla working?..
> 
> /Subzero
> 
> 
> ----- Original Message -----
> From: "Jeff Cohen" <ap...@gej-it.com>
> To: <us...@httpd.apache.org>
> Sent: Tuesday, January 28, 2003 9:17 PM
> Subject: RE: [users@httpd] VirtualDirectory
> 
> 
> Hi Subzero,
> 
> You should delete the "VirtualDirectory" directive you have set up on your
> conf file and add the directory as "ScriptAlias", check how is the cgi-bin
> directory is configured and copy its directives, than change the route to
> the folder.
> 
> Hint: the cgi-bin folder have ExecCGI option on its directives.
> 
> All the best,
> Jeff Cohen
> 
> -----Original Message-----
> From: Subzero [mailto:subzero@spiderweb.tk]
> Sent: Tuesday, January 28, 2003 4:13 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] VirtualDirectory
> 
> Hi
> 
> I have created a VirtualDirectory in the conf file.
> The virtualdir is a folder in the cgi-bin, but when i surf to my newly
> created virtualdirectory, i see the .pl file i am accessing as plain
> text..
> Everything works fine as long as i access that file by it's 'real' url,
> but
> when i uses the virtual dir, i just see it as plain text, but i do see the
> correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i
> guess.
> i have added this folder in the scriptalias setting too.. but it didn't
> help
> me.. i guess i really shouldn't need to add it there either, since i
> already
> have the cgi-bin there and the folder i have in my vitrualdir is a
> subfolder
> of cgi-bin
> 
> I have read through the FAQ about this and did just as it said, but i
> still
> won't get it working..
> Any ideas on what i am doing wrong or what i have missed?
> 
> /Subzero
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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


Re: [users@httpd] VirtualDirectory

Posted by Subzero <su...@spiderweb.tk>.
Ok, i have done both of them.. one VitrualDirectory and then i got the
problem with the .pl file not being processed by apache, so i added a
ScriptAlias for that same folder aswell, and i also added that .pl file as
an index file, so i wouldnät have to type the filename when going to that
folder..
but, i will remove the virtualdirectory and keep the scriptalias.. but if i
only have the scriptalias, how will i get blabla.blabla.bla working?..

/Subzero


----- Original Message -----
From: "Jeff Cohen" <ap...@gej-it.com>
To: <us...@httpd.apache.org>
Sent: Tuesday, January 28, 2003 9:17 PM
Subject: RE: [users@httpd] VirtualDirectory


Hi Subzero,

You should delete the "VirtualDirectory" directive you have set up on your
conf file and add the directory as "ScriptAlias", check how is the cgi-bin
directory is configured and copy its directives, than change the route to
the folder.

Hint: the cgi-bin folder have ExecCGI option on its directives.

All the best,
Jeff Cohen

-----Original Message-----
From: Subzero [mailto:subzero@spiderweb.tk]
Sent: Tuesday, January 28, 2003 4:13 AM
To: users@httpd.apache.org
Subject: [users@httpd] VirtualDirectory

Hi

I have created a VirtualDirectory in the conf file.
The virtualdir is a folder in the cgi-bin, but when i surf to my newly
created virtualdirectory, i see the .pl file i am accessing as plain text..
Everything works fine as long as i access that file by it's 'real' url, but
when i uses the virtual dir, i just see it as plain text, but i do see the
correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i
guess.
i have added this folder in the scriptalias setting too.. but it didn't help
me.. i guess i really shouldn't need to add it there either, since i already
have the cgi-bin there and the folder i have in my vitrualdir is a subfolder
of cgi-bin

I have read through the FAQ about this and did just as it said, but i still
won't get it working..
Any ideas on what i am doing wrong or what i have missed?

/Subzero


---------------------------------------------------------------------
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




---------------------------------------------------------------------
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


RE: [users@httpd] VirtualDirectory

Posted by Jeff Cohen <ap...@gej-it.com>.
Hi Subzero,

You should delete the "VirtualDirectory" directive you have set up on your
conf file and add the directory as "ScriptAlias", check how is the cgi-bin
directory is configured and copy its directives, than change the route to
the folder.

Hint: the cgi-bin folder have ExecCGI option on its directives.

All the best,
Jeff Cohen

-----Original Message-----
From: Subzero [mailto:subzero@spiderweb.tk] 
Sent: Tuesday, January 28, 2003 4:13 AM
To: users@httpd.apache.org
Subject: [users@httpd] VirtualDirectory

Hi
 
I have created a VirtualDirectory in the conf file.
The virtualdir is a folder in the cgi-bin, but when i surf to my newly
created virtualdirectory, i see the .pl file i am accessing as plain text.. 
Everything works fine as long as i access that file by it's 'real' url, but
when i uses the virtual dir, i just see it as plain text, but i do see the
correct .pl file, so the virtualdirectory setting in httpd.conf is Ok i
guess.
i have added this folder in the scriptalias setting too.. but it didn't help
me.. i guess i really shouldn't need to add it there either, since i already
have the cgi-bin there and the folder i have in my vitrualdir is a subfolder
of cgi-bin
 
I have read through the FAQ about this and did just as it said, but i still
won't get it working..
Any ideas on what i am doing wrong or what i have missed?
 
/Subzero


---------------------------------------------------------------------
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