Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 10098 - cups web browser configuration CGI scripts and apache , etc.
Summary: cups web browser configuration CGI scripts and apache , etc.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Donny Davies (RETIRED)
Depends on:
Reported: 2002-11-02 11:10 UTC by David E.Miller
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description David E.Miller 2002-11-02 11:10:42 UTC
Emerged cups. Attempted to use http://localhost:631. Apache returned access 
denied error. Did some snooping. Found cups CGI scripts installed in directory:

This directory where these cups CGI scripts are located is outside the normal 
scope of any apache directory directive with ExecCGI option as apache is 
normally installed and configured. Therefore I found it to be impossible to 
install apache and then install cups and then access these CGI scripts from a 
web browser from the localhost without making a manual configuration change to 
apache as shown below which I made to commonapache.conf

<Directory /usr/lib/cups/cgi-bin/>
    AllowOverride All
    Options ExecCGI
    Order allow,deny
    Allow from all

After amking this change and restarting apache I was able to execute the 
cups "ESP" CGI scripts without a problem.

There possibly needs to be a cups emerge configuration process run from a 
configuration file in /etc/conf.d to add the above to apache. Else the cups CGI 
scripts need to be installed within a directory normally within the scope of 
apache as installed that allows CGI scripts to be executed from a browser.
Comment 1 Donny Davies (RETIRED) gentoo-dev 2002-11-03 06:50:06 UTC
David - Apache has nothing to do with cups.

Have a nice day.

Comment 2 David E.Miller 2002-11-03 10:58:42 UTC
You are correct. I made a mistake about the apache configuration being involved 
with the problem I described. The http://localhost:631 cups ESP CGI scripts 
execute whether the aforementioned commonapache.conf directory directives are 
there are not. I found this out after I re-emerged cups. I commented out the 
directory directives and the main page for the ESP web-based cups set-up 
appears on the browser. 
It turns out the problem I am experiencing is a little more subtle than I 
thought and I did not notice exactly what was going on the first time. The ESP 
CGI cups browser scripts work as advertised except for two functions. After a 
printer is added, if I attempt the Print test Page function or I click on the 
link to the printer name itself, the URL address in the browser window changes 
from http://localhost:631 to . This is the 
FQDN for the host. This happens on its own for these two functions only. At 
that point I get a white HTML screen with a message about not having access to 
the resource requested. If I manually edit the browser URL line to to change 
the name back to localhost and leave everything else the same, and press the 
enter key, the correct page appears. This happens only for the Print Test Page 
and the when I click on the link on the printers page to the printer name 
itself, and it happens every time.

Since these are CGI scripts that appear to binary, I am at a loss to understand 
why the URL would change from "localhost" to the FQDN for my host, for these 
two functions. The FQDN is located only three places that I know of on my 
system: in the apache.conf file as the ServerName, in the /etc/hostname file 
and in my /etc/hosts file. The CGI scripts seems to be pulling this from one of 
these and I suspect it is the apache.conf file. I am going to change the name 
in these files one at a time and resart apache and see what happens, but it is 
still an anomaly if this turns out to be the problem. I have a Mandrake Linux 
9.0 system that does not exhibit these same symptoms. I am going to edit the  
files for this system and see if the same thing happens.
Comment 3 Donny Davies (RETIRED) gentoo-dev 2002-11-03 16:05:31 UTC
David - Apache has nothing to do with cups.

do not re-open this again.  what is your problem?

if you have a bug with something else cups related, then
open an appropriate report.

Have a nice day.
Comment 4 David E.Miller 2002-11-03 16:53:51 UTC
Your answer is of no help with the problem. I intend to follow the course of 
action of your response. You will see not further reports from me on this 

Have a nice day!
Comment 5 Grant Goodyear (RETIRED) gentoo-dev 2002-11-13 14:43:29 UTC
It's actually a cups bug.  Hopefully the next release will fix it; otherwise
it's essentially cosmetic, so we're ignoring it (because the previous cups
version was even more broken).