Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Virtual host and cgi Help

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  untar problem with mod_jk  
Author Message
user2459

External


Since: Sep 08, 2003
Posts: 3



(Msg. 1) Posted: Mon Sep 08, 2003 3:50 am
Post subject: Virtual host and cgi Help
Archived from groups: alt>apache>configuration (more info?)

iam running slackware 9.0 and apache1.3 webserver.

i have set up virtualhost, and have 2 domains on my server, one of my
domains(mydoamin2) can´t execute cgi, the other can.
I get this in my error.log "Options execCGI is off in this directory"

Please anyone.

My "vhost.conf"

NameVirtualHost 192.168.1.9

<VirtualHost 192.168.1.9>
DocumentRoot /var/www/htdocs
ServerName mydomain1.com
ServerAlias www.mydomain1.com
ServerAdmin webmaster.DeleteThis@mydomain1.com
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
AllowOverride All
Options None
Order allow,deny
Allow from all
</Directory>

</IfModule>

</VirtualHost>


<VirtualHost 192.168.1.9>
ServerName www.mydomain2.com
ServerAlias www.mydomain2.com
ServerAdmin webmaster.DeleteThis@mydomain2.com

AddHandler cgi-script cgi pl

Options Indexes FollowSymLinks +ExecCGI MultiViews Includes

VirtualDocumentRoot /var/www/mydomain2.com/www_root
Alias /cgi-bin/ /var/www/mydomain2.com/cgi-bin
<Directory "/var/www/mydomain2.com/cgi-bin/">
Options +ExecCGI
</Directory>
DocumentRoot /var/www/mydomain2.com/www_root

</IfModule>

</VirtualHost>

 >> Stay informed about: Virtual host and cgi Help 
Back to top
Login to vote
user2431

External


Since: Aug 21, 2003
Posts: 23



(Msg. 2) Posted: Mon Sep 08, 2003 3:37 pm
Post subject: Re: Virtual host and cgi Help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"JK" <jk.DeleteThis@privat.tele.dk> escribió en el mensaje
news:3f5bb62c$0$16844$edfadb0f@dread11.news.tele.dk...
 > i have set up virtualhost, and have 2 domains on my server, one of my
 > domains(mydoamin2) can´t execute cgi, the other can.
 > I get this in my error.log "Options execCGI is off in this directory"

 > <Directory "/var/www/cgi-bin">
 > AllowOverride All
 > </Directory>

 > <Directory "/var/www/mydomain2.com/cgi-bin/">
 > Options +ExecCGI
 > </Directory>

You are maybe missing an AllowOverride directive for
/var/www/mydomain2.com/cgi-bin and Options +ExecCGI is being ignored.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Virtual host and cgi Help 
Back to top
Login to vote
user2459

External


Since: Sep 08, 2003
Posts: 3



(Msg. 3) Posted: Mon Sep 08, 2003 7:38 pm
Post subject: Re: Virtual host and cgi Help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have changed my vhost.conf to this:

<VirtualHost 192.168.1.9>

DocumentRoot /var/www/mydomain2/www_root

ServerName mydomain2.com

ServerAlias <a style='text-decoration: underline;' href="http://www.mydomain2.com" target="_blank">www.mydomain2.com</a>

ServerAdmin webmaster RemoveThis @mydomain2.com

Options Indexes FollowSymLinks ExecCGI MultiViews Includes

AddHandler cgi-script .cgi .pl

Alias /cgi-bin/ /var/www/mydomain2/cgi-bin/

<Directory "/var/www/mydomain2/cgi-bin/">

AllowOverride All

Options ExecCGI

</Directory>

</VirtualHost>

And now i get this error in my log,

[error] (2)No such file or directory: exec of
/var/www/mydomain2/cgi-bin/server.cgi failed

And i know for sure the file is in that directory

"Alvaro G. Vicario" <alvaro.QUITAR_REMOVE RemoveThis @telecomputeronline.com> skrev i en
meddelelse news:bjhm5i$ign87$1@ID-157797.news.uni-berlin.de...
 > "JK" <jk RemoveThis @privat.tele.dk> escribió en el mensaje
 > news:3f5bb62c$0$16844$edfadb0f@dread11.news.tele.dk...
  > > i have set up virtualhost, and have 2 domains on my server, one of my
  > > domains(mydoamin2) can´t execute cgi, the other can.
  > > I get this in my error.log "Options execCGI is off in this directory"
 >
  > > <Directory "/var/www/cgi-bin">
  > > AllowOverride All
  > > </Directory>
 >
  > > <Directory "/var/www/mydomain2.com/cgi-bin/">
  > > Options +ExecCGI
  > > </Directory>
 >
 > You are maybe missing an AllowOverride directive for
 > /var/www/mydomain2.com/cgi-bin and Options +ExecCGI is being ignored.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual host and cgi Help 
Back to top
Login to vote
user2431

External


Since: Aug 21, 2003
Posts: 23



(Msg. 4) Posted: Mon Sep 08, 2003 7:41 pm
Post subject: Re: Virtual host and cgi Help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"JK" <jk.RemoveThis@privat.tele.dk> escribió en el mensaje
news:3f5c945b$0$16861$edfadb0f@dread11.news.tele.dk...
 > And now i get this error in my log,
 >
 > [error] (2)No such file or directory: exec of
 > /var/www/mydomain2/cgi-bin/server.cgi failed
 >
 > And i know for sure the file is in that directory

First of all we should discard that the error is in the script itself. Try
first a bulletproof script:

#!/bin/bash

echo Content-Type: text/html
echo
echo '<html><h1>Hello</h1></html>'

And don't forget to make it executable: chmod +x script.cgi<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual host and cgi Help 
Back to top
Login to vote
user2459

External


Since: Sep 08, 2003
Posts: 3



(Msg. 5) Posted: Wed Sep 10, 2003 3:18 am
Post subject: Re: Virtual host and cgi Help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for your help, I found the error, i shuld insert this " in /Alias
/cgi-bin/ "/var/www/mydomain2.com/cgi-bin" and the space between /cgi-bin/
and "/var/www. should be removed then it works.

thanks again.
Cheers
JK

"Alvaro G. Vicario" <alvaro.QUITAR_REMOVE.RemoveThis@telecomputeronline.com> skrev i en
meddelelse news:bji4e5$is5mf$1@ID-157797.news.uni-berlin.de...
 > "JK" <jk.RemoveThis@privat.tele.dk> escribió en el mensaje
 > news:3f5c945b$0$16861$edfadb0f@dread11.news.tele.dk...
  > > And now i get this error in my log,
  > >
  > > [error] (2)No such file or directory: exec of
  > > /var/www/mydomain2/cgi-bin/server.cgi failed
  > >
  > > And i know for sure the file is in that directory
 >
 > First of all we should discard that the error is in the script itself. Try
 > first a bulletproof script:
 >
 > #!/bin/bash
 >
 > echo Content-Type: text/html
 > echo
 > echo '<html><h1>Hello</h1></html>'
 >
 > And don't forget to make it executable: chmod +x script.cgi
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual host and cgi Help 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Virtual host - Redhat 9.0 [root@linux bin]# ./apachectl start [Sun Aug 17 11:53:43 2003] [warn] module mod_php4.c is already added, skipping [Sun Aug 17 11:53:43 2003] [warn] module php4_module is already loaded, skipping [Sun Aug 17 11:53:43 2003] [warn] VirtualHost....

Virtual Host From PS? - Ok.. so I am running a server with a bunch of virtual hosts.. Someone on one of them is running a PHP script or CGI thats causing problems and im getting huge load spikes and sometimes even crashing the entire server requiring a hard reboot to fix it.. ...

Virtual Host Configuration - I have configured http.conf for virtual hosts like this: #NameVirtualHost 1.2.3.4:80 NameVirtualHost myipaddressishere <VirtualHost www.domain1.com> ServerName fw.domain1.com ServerAdmin netinterest@domain1.com DocumentRoo...

FollowSymLinks and Virtual host - Hello, I'm trying to setup Apache to server virtual hosts from user's home directories, and having problem with symbolic links. The document root of each virtual host is /var/www/html/{www.domainname.tld} and they're symbolic linked to user's home..

Only one subdomain to a virtual host - Hello, I've a virtual hosting ServerName example.com ServerAlias *.example.com This is the first virtual hosting, therefor the standard one. But I want to introduce another virtual hosting on a subdomain from example.com, but I still..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]