Solved

problem with path to CGI file which tests .htaccess

Posted on 2001-08-20
7
157 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

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

Expert Comment

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

Expert Comment

by:maneshr
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now