LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
 
Search this Thread
Old 02-10-2008, 09:49 PM   #1
qwerty_tele
Member
 
Registered: Oct 2007
Posts: 32

Rep: Reputation: 15
.htaccess help


Hi!

Here is the situation: I have rented web space on a server somewhere "out there". It is a Linux-based system. I want to have a small website to share family photos. I want to secure the website using .htaccess. I DON'T have access to the base file structure on the server. I have to use a "web shell" to upload the html pages to the server. All I see is www.woodwardlink.com and I can add subfolders to that base. I can get .htaccess to open the user/pass dialog when I hit the area I want to secure, but I cannot get the user/pass combo to unlock the secured area. I have a feeling that I don't have the path to .htpasswd right in the .htaccess file and this is what is causing it to break down. Below are the scripts for both .htaccess and .htpasswd:

.htaccess (resides at http://www.woodwardlink.com/secure)

AuthName "Access to Woodward Link"
AuthType Basic
AuthUserFile http://www.woodwardlink.com/pass/.htpasswd
Require valid-user

.htpasswd resides exactly in the path mentioned about, that is, on the webserver that I have rented space, within the www.woodwardlink.com folder, inside of a folder called pass.

What am I missing? I used a website called kxs.net to generate the encoded userass script, so I am assuming that they are correct. Everytime I enter a user/pass combo, the enter user/pass dialog pops right back up...

Any expertise is as always, greatly appreciated.

T.W.
 
Old 02-10-2008, 10:10 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,679

Rep: Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563
AuthUserFile does not take a URL, it takes an absolute system path. Something like /home/qwerty_tele/webroot/secure/.htpasswd .
 
Old 02-11-2008, 02:42 AM   #3
qwerty_tele
Member
 
Registered: Oct 2007
Posts: 32

Original Poster
Rep: Reputation: 15
How to find system path

Any ideas on how to get an absolute system path when the system is not yours?
 
Old 02-11-2008, 09:29 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,679

Rep: Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563
Ask your sysadmin? :S

I guess you don't have shell access?
 
Old 02-11-2008, 09:53 AM   #5
akuma_linux
Member
 
Registered: Aug 2006
Distribution: Ubuntu, CentOS
Posts: 31

Rep: Reputation: 15
Hi qwerty_tele

Save the following text in a file called phpinfo.php :

Code:
<?php
phpinfo();
?>
Upload the file into your webspace, then go to that page in your web browser - e.g http://www.woodwardlink.com/phpinfo.php. If you search the page for _SERVER["SCRIPT_FILENAME"] you should get the absolute server path.
 
Old 02-11-2008, 08:31 PM   #6
qwerty_tele
Member
 
Registered: Oct 2007
Posts: 32

Original Poster
Rep: Reputation: 15
php solution worked!

aukuma_linux, you are a genius! Worked like a charm! Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess-any help fareen Linux - Networking 0 01-20-2006 02:05 PM
.htaccess luca2005 Linux - Software 2 01-01-2005 07:38 PM
.htaccess kidestranged Linux - General 1 01-26-2004 10:18 AM
htaccess spank Linux - Newbie 1 10-27-2003 01:49 PM
htaccess help skillcoyne Linux - General 4 04-02-2003 03:46 PM


All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration