FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-08-2010, 10:13 AM
Zachary Uram
 
Default cgi-bin works with IP but not domain name

Some more info. I looked at my access.log for oggthebase.org.

When I went to http://www.oggthebase.org/cgi-bin/awstats.pl it generated:

[Mon Nov 08 10:56:52 2010] [error] [client 72.0.209.165] File does not
exist: /var/www/oggthebase.org/cgi-bin

So it is going to /var/www/oggthebase.org/cgi-bin

I do *not* want to have a special cgi-bin for each vhost. I only want
it to use the system's /usr/lib/cgi-bin

How can I make this happen?

Zach


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinhoswsKSYMhPs1f3LQiF_D0a2mvJ+EV-KgpCOk@mail.gmail.com">http://lists.debian.org/AANLkTinhoswsKSYMhPs1f3LQiF_D0a2mvJ+EV-KgpCOk@mail.gmail.com
 
Old 11-08-2010, 10:59 AM
Camaleón
 
Default cgi-bin works with IP but not domain name

On Mon, 08 Nov 2010 05:54:17 -0500, Zachary Uram wrote:

> I have various name based virtual hosts setup. They all work fine.
> However if I try to run a script in /usr/lib/cgi-bin it fails when I
> specify the domain name, but works if I specify my IP name (this is a
> VPS)!

(...)

> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory
> "/usr/lib/cgi-bin">
> AllowOverride None
^^^^^^^^^^^^^^^^^^

Shoudn't be "AllowOverride Options"?

> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order
> allow,deny
> Allow from all
> </Directory>

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.08.11.59.15@gmail.com">http://lists.debian.org/pan.2010.11.08.11.59.15@gmail.com
 
Old 11-08-2010, 11:08 AM
Camaleón
 
Default cgi-bin works with IP but not domain name

On Mon, 08 Nov 2010 06:13:26 -0500, Zachary Uram wrote:

> Some more info. I looked at my access.log for oggthebase.org.
>
> When I went to http://www.oggthebase.org/cgi-bin/awstats.pl it
> generated:
>
> [Mon Nov 08 10:56:52 2010] [error] [client 72.0.209.165] File does not
> exist: /var/www/oggthebase.org/cgi-bin
>
> So it is going to /var/www/oggthebase.org/cgi-bin
>
> I do *not* want to have a special cgi-bin for each vhost. I only want it
> to use the system's /usr/lib/cgi-bin
>
> How can I make this happen?

I prefer keeping a different/isolated "/cgi-bin" for each apache vhost,
is kind a security measure and to avoid messing up things (users and
perms).

For shared addon services (phpmyadmin, awstats/webalizer...) I still keep
all the stuff inside "/var/www/".

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.08.12.08.37@gmail.com">http://lists.debian.org/pan.2010.11.08.12.08.37@gmail.com
 
Old 11-08-2010, 01:37 PM
"Jesús M. Navarro"
 
Default cgi-bin works with IP but not domain name

Hi, Zachary:

On Monday 08 November 2010 11:54:17 Zachary Uram wrote:
> I have various name based virtual hosts setup. They all work fine.
> However if I try to run a script in /usr/lib/cgi-bin it fails when I
> specify the domain name, but works if I specify my IP name (this is a
> VPS)!

As a general matter these kind of symptoms always points out a
misconfiguration at the virtual server level.

> So this, http://97.107.134.151/cgi-bin/awstats.pl, works
>
> But this, http://www.oggthebase.org/cgi-bin/awstats.pl, gives error
> "Oops! This link appears to be broken."

So cgi-bin is properly configured for the "default" server but it is not at
the given virtual server level.

> I'm running apache 2.2.16-3.
>
> Here is my /etc/apache2/sites-available/default:
>
> <VirtualHost 97.107.134.151:80>

[...]

> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>

"Default" doesn't mean "use config stanzas from this site if you don't find
anything more specific at the virtual server level" but "use this site if you
can't find the one asked for".


> Here is my /etc/apache2/sites-available/oggthebase.org:
>
> <VirtualHost 97.107.134.151:80>
> ServerAdmin root@oggthebase.org
> ServerName oggthebase.org
> ServerAlias www.oggthebase.org
> DocumentRoot /var/www/oggthebase.org/
> ErrorLog /var/www/oggthebase.org/logs/error.log
> CustomLog /var/www/oggthebase.org/logs/access.log combined
> </VirtualHost>

So you didn't define a specific cgi-bin resource at the oggthebase.org level.

You said in a different message this:
> When I went to http://www.oggthebase.org/cgi-bin/awstats.pl it generated:
>
> [Mon Nov 08 10:56:52 2010] [error] [client 72.0.209.165] File does not
> exist: /var/www/oggthebase.org/cgi-bin
>
> So it is going to /var/www/oggthebase.org/cgi-bin

Of course it is! You didn't define anything specific to /cgi-bin at the
virtual server level, so it's going to search for the resource at [document
root]/[asked-for path], exactly as it should.

> I do *not* want to have a special cgi-bin for each vhost. I only want
> it to use the system's /usr/lib/cgi-bin
>
> How can I make this happen?

Making sure you "tell" that to each and every virtual server. You can add the
cgi-bin definition at every defined virtual server, so it looks like...

/etc/apache2/sites-available/oggthebase.org:
<VirtualHost 97.107.134.151:80>
ServerName oggthebase.org
ServerAlias www.oggthebase.org
[...]
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
[...]
</VirtualHost>

Or you can "move" that config snipet to a different file and make sure
you "include" it from each virtual server that needs it (the advantage being
that you will need to change the definition only on one file should the need
arises).

Cheers.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201011081537.07901.jesus.navarro@undominio.net">ht tp://lists.debian.org/201011081537.07901.jesus.navarro@undominio.net
 
Old 11-11-2010, 08:39 AM
Zachary Uram
 
Default cgi-bin works with IP but not domain name

Thanks for the idea Camaleón.

Zach
<>< http://www.fidei.org ><>
 
Old 11-11-2010, 08:42 AM
Zachary Uram
 
Default cgi-bin works with IP but not domain name

Ah I see. Thanks Jesús I have it working now

Zach
<>< http://www.fidei.org ><>
 

Thread Tools




All times are GMT. The time now is 06:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org