Re: cgi-bin works with IP but not domain name
Thanks for the idea Camaleón. Zach http://www.fidei.org
Re: 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
cgi-bin works with IP but not domain name
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)! 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. I'm running apache 2.2.16-3. Here is my /etc/apache2/sites-available/default: VirtualHost 97.107.134.151:80 DocumentRoot /var/www Directory / Options FollowSymLinks AllowOverride None /Directory Directory /var/www/ Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all /Directory 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 ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 /Directory /VirtualHost Here is the contents of my /etc/apache2/sites-available/: darcs default gytha default-ssl jesujuva.org oggthebase.org Here is my /etc/apache2/sites-available/oggthebase.org: VirtualHost 97.107.134.151:80 ServerAdmin r...@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 I'd really appreciate any help in solving this. Zach http://www.fidei.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=bp-=qhshfutba9e6tbvhlso80kfcghk2ga...@mail.gmail.com
Re: 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-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktinhoswsksymhps1f3lqif_d0a2mvj+ev-kgp...@mail.gmail.com
Re: 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-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.11.08.11.59...@gmail.com
Re: 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-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/pan.2010.11.08.12.08...@gmail.com
Re: 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 r...@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-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201011081537.07901.jesus.nava...@undominio.net