Solved

problem with path to CGI file which tests .htaccess

Posted on 2001-08-20
7
168 Views
Last Modified: 2013-12-25
If I enter
http://www.myISP.com/~myUsername/cgi-bin/password-protected directory/authen.cgi
into my browser, I get the prompt for username and password like I'm supposed to, but if I enter
http://www.myDomainName.com/cgi-bin/password-protected directory/authen.cgi
into my browser I get an error message saying my ISP can't find that file.  Why can't I use my domain name?

the directory
home/users/m/myUserName/www/cgi-bin/password-protected directory
contains the following files:

.htaccess

AuthUserFile /home/users/m/myUserName/public_html/cgi-bin/password-protected directory/.htpasswd
AuthName "Owner"
AuthType Basic

require valid-user

*******

.htpasswd

you:QTVNZznsa8t3c
up:La/1nQpmdvpHc
************

authen.cgi

#!/usr/bin/perl -w
# authen.cgi
use strict;
use CGI;
my $q = new CGI;
my $user = "";
$user = $q->remote_user();
print $q->header();
print $q->start_html("Authentication Test");
print <<Text;
$user<br>
Text
;
print $q->end_html();

0
Comment
Question by:myudt
  • 4
  • 2
7 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 6409986
If your ISP said that it "can't find that file", it's a routing or DNS problem at your ISP.
Are you shure that the message comes from your ISP?
0
 

Author Comment

by:myudt
ID: 6410419
Yes, I'm sure.  The message comes in the form of a webpage with the ISP's logo and the following message:

Document Not Found

We're sorry, the file you have requested can not be found on any of our
servers.

You can use your browser's Back Arrow to return to the previous page.

The pages in the area you were attempting to access appear to be maintained by webmaster@myDomainName.com.
0
 

Author Comment

by:myudt
ID: 6410791
Yes, I'm sure.  The message comes in the form of a webpage with the ISP's logo and the following message:

Document Not Found

We're sorry, the file you have requested can not be found on any of our
servers.

You can use your browser's Back Arrow to return to the previous page.

The pages in the area you were attempting to access appear to be maintained by webmaster@myDomainName.com.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:myudt
ID: 6410795
ahoffmann, I'm having my ISP check for possible problem.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6412196
Soungs like you're using the proxy at your ISP.
0
 
LVL 16

Expert Comment

by:maneshr
ID: 6418217
myudt,

"..Why can't I use my domain  name?.."

Can you pl. post the exact URL here?

that will help me provide you with a more accurate suggestion for a solution.

Let us know.
0
 

Author Comment

by:myudt
ID: 6420253
ahoffmann, you get the points, you pointed me in the right direction -- to my ISP.  According to my ISP, I cannot access a .htpasswd - protected directory that is under my cgi-bin directory via my domain name, only via my ISP's domain name.  They didn't explain why, and I don't know enough about UNIX to speculate.  

In other words, what I was experiencing was not really an error, it seems to be how their system is configured.

At any rate, I have to put my protected directory under my www directory -- no big deal.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question