-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web interface: "Test Printer" points to "ServerName", not to "localhost" #34
Comments
CUPS.org User: mike I'm guessing that ServerName is set to something other than the hostname or the IP address of the system? If so, the default authentication WILL NOT WORK for any printing, since the URI that is advertised is not accessible and this is a configuration problem, not a CUPS bug. |
CUPS.org User: till.kamppeter is the IP of my box, and I can print the test page, the problem is, that I get to a URL and when I continue from there I cannot do any admin access any more. |
CUPS.org User: mike Is the IP address the same as the one logged in the access_log file? |
CUPS.org User: till.kamppeter Below is the stuff written into access_log when going at first to http://localhost:631/printers/lpdtest and then clicking "Print Test Page" which lead to http://192.168.100.184:631/printers/lpdtest?op=print-test-page On the printer page all accesses go to localhost, on the driver page all except the "POST" go to 192.168.100.184. localhost - root [23/Apr/2003:23:42:20 +0200] "GET /printers/ HTTP/1.1" 200 0 192.168.100.184 - - [23/Apr/2003:23:43:29 +0200] "GET /printers/lpdtest?op=print-test-page HTTP/1.1" 200 1560 |
CUPS.org User: till.kamppeter The same problem also occurs on http://localhost:631/printers/ When I click on a local printer (queue name or printer icon on the left) to get to the printer´s page I get also http://[Server]:631/printers/[queue] instead of the expected http://localhost:631/printers/[queue] when I have "ServerName [Server]" in my /etc/cups/cupsd.conf. So if I want to go to a printer´s page for administration, I cannot access the admin stuff any more as I am not on localhost any more. |
CUPS.org User: mike Does the problem occur if you set HostNameLookups to "on"? |
CUPS.org User: till.kamppeter Yes, when I set "HostNameLookups On", it works as expected. Local printers in the printer list have "http://localhost:631/..." links and also the "Print Test Page" links are pointing to "http://localhost:631/...". Now I am wondering why without "HostNameLookups On" I get the network interface IP and not "127.0.0.1". |
CUPS.org User: mike Because the local IP != localhost (it isn't the loopback interface) If you want to use a servername that isn't the value of gethostname, then you need to enable hostname lookups. |
Version: 1.1.19rc2
CUPS.org User: till.kamppeter
I am running Mandrake 9.1 with CUPS 1.1.19rc2 (freshly RPMized, RPM on current Cooker). My /etc/cups/cupsd.conf contains a "ServerName ..." directive. When I browse (Browser: Konqueror from KDE 3.1.0) all printers with
http://localhost:631/printers
or one locally defined printer with
http://localhost:631/printers/
and click on "Test Printer", I get to the URL
http://:631/printers/?op=print-test-page
where is the name which I have specified in the "ServerName ..." directive. What I expect is "localhost" as I get with all the other buttons ("Configure Printer", "Modify Printer", ...). I get "localhost" when I comment out or remove the "ServerName ..." directive in /etc/cups/cupsd.conf.
This leads to the following problem: If you need a "ServerName ..." directive (for example if you have two network interfaces and on the two networks your machine has different names) and you restrict the web interface to only be accessible by "localhost" you will not be able to print a test page from the web interface.
For admin access the web interface is restricted to "localhost" on most machines, and if you ar adjusting the printer defaults with "Configure Printer", then use "Test Printer" to check whether your settings are OK, and afterwards click the link on the "Test page sent; job ID is -." page to get back to the printer page, you will arrive on
http://:631/printers/
and not on
http://localhost:631/printers/
and so another click on "Configure Printer" goes to
http://:631/admin/?op=config-printer&printer_name=
which gives you a "Permission denied".
The text was updated successfully, but these errors were encountered: