[CentOS] Re: NameVirtualHost and CGI Problems

Mike -- EMAIL IGNORED m_d_berger_1900 at yahoo.com
Thu Oct 9 16:59:00 UTC 2008

On Thu, 09 Oct 2008 17:51:54 +0200, Ralph Angenendt wrote:

> Don't we all like puzzles? All those hundreds of pieces which look
> similar? Is that blue one there sky or is it the water? The green one
> over there - is it a tree? Is it a part of that house which has been
> painted green?
> If you want to solve that puzzle, it often helps to look at the picture
> on the top of the box.
> IOW: What did you try to do? What happened? What did you expect to
> happen? What does your config look like? Are there any errors in the log
> file?
> Ralph

Indeed.  Here is a summary:

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
   <Location />
      Order allow,deny
#      Allow from All
      Deny from all

   ServerName new.rosemike.net
   Options -All SymLinksIfOwnerMatch ExecCGI
   DocumentRoot "/var/www/html/www"
   DirectoryIndex index.cgi
   RewriteEngine on
   RewriteOptions Inherit
   RewriteRule ^/$ - [L]

All access attempts are with http://new.rosemike.net/
with that name appropriately defined in hosts files, as
verified by ping.

Now run as shown, the client gets:
   "You don't have permission to access / on this server."
If you comment out the first VirtualHost block:
   you get the same thing
If you then add to the second virtual host block:
      <Location />
         Allow from All
you get:
   "You don't have permission to access /index.cgi on this server."
    (note that there are links to index.cgi in all directories.)
if you comment out Servername
   nothing changes
If you now expose the first VirtualHost block and change to
      Allow from All
      Deny from None
   you get the page displayed, but not via the CGI, as verified
   by absence debug text the CGI would have added, as well as
   nothing in a log the CGI writes.

Well, you asked.  BTW, I emphasize that this configuration works
well on Fedora, which you can see at www.rosemike.net .

Thanks for your interest.

More information about the CentOS mailing list