Top Bar
Top Bar
 
Advanced Search
Top Bar

Top Bar QLD NSW VIC WA NT SA

  

Register Search Today's Posts Mark Forums Read
People Telecom Forum | Technical Help | Hosting | How To .htaccess (Password Protected Webspace)

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-04-2004, 10:44 AM   #1
PT_Richard
Administrator
 
PT_Richard's Avatar
 
Join Date: Sep 2003
Posts: 754
Exclamation How To .htaccess (Password Protected Webspace)

First Read:

Using your People Telecom broadband customer home page webspace facility.

We have support .htaccess Auth overrides, so
here are some hints using groups (if you don't want groups then just use "require valid-user")

WEB-MAILBOX = the email account you associated as a webspace (do not include @people.net.au)

Live Webspace Path:

/swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/html/

* WEB-MAILBOX does not include ~ like the URL

Using Apache Tool to generate password file:

htpasswd -c -b .htpasswd fred bannanas

FILE CONTENT - /swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/.htpasswd

fred:FcYWgJ1GoG0ZA ***YES THIS IS ENCRYPTED, SEE BELOW INFO ***

FILE CONTENT- /swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/.htgroup

mates: fred

Access override control file:

FILE CONTENT - /swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/html/SOME-PROTECTED-DIR/.htaccess

AuthUserFile /swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/.htpasswd
AuthName "Login Required For SOME-PROTECTED-DIR"
AuthType Basic
Require valid-user

URL :EGhttp://home.people.net.au/~WEB-MAILBOX/SOME-PROTECTED-DIR


Quick N Easy online tool: http://www.webmaster-toolkit.com/hta...enerator.shtml

Ref: FORUM: htaacess protected area

http://www.htaccessmanager.com/
PT_Richard is offline   Reply With Quote
Old 05-04-2004, 11:48 AM   #2
PT_Richard
Administrator
 
PT_Richard's Avatar
 
Join Date: Sep 2003
Posts: 754
htpasswd

Hi Simon,

I don't know of any such tool.

A perl script would do that .

What you would really want to do is use PERL or php talking to a database full of user / pass.

Richard
PT_Richard is offline   Reply With Quote
Old 05-04-2004, 06:17 PM   #3
mbottrell
 
Posts: n/a
Try the following:

http://www.evrsoft.com/developers/to...enerator.shtml

If you can program in Perl look at this :
http://search.cpan.org/~bdfoy/Apache...ib/Htaccess.pm

A simple shell script will generate a htpasswd file with loads of users/groups.

Cheers,

Matt.
  Reply With Quote
Old 05-04-2004, 06:21 PM   #4
mbottrell
 
Posts: n/a
Ohh... take a look at this Windoze tool:

http://www.tlhouse.co.uk/HTAccessible.shtml

Also you might wish to search google

Cheers,

Matt.
  Reply With Quote
Old 06-04-2004, 09:45 AM   #5
PT_Richard
Administrator
 
PT_Richard's Avatar
 
Join Date: Sep 2003
Posts: 754
Matt

Hi Matt,

Im going to compile all this very usefull snippets to provide
a complete header post to this thread.

http://www.softpedia.com/public/cat/...0-8-7-24.shtml

Thank you !

Richard
PT_Richard is offline   Reply With Quote
Old 06-04-2004, 11:36 AM   #6
mbottrell
 
Posts: n/a
Hi Richard,

Yeah that's a v.good idea!

I'm sure the users will find it most useful.
Well done you!

Cheers,

Matt.
  Reply With Quote
Old 12-04-2004, 07:52 PM   #7
global
 
Posts: n/a
Could someone please tell me if this looks OK???

.htaccess

AuthType Basic
AuthUserFile h**p://home.swiftdsl.com.au/10-DIGIT-ADSL#/~XXXXXX/.htpasswd
AuthGroupFile h**p://swiftdsl.com.au/10-DIGIT-ADSL#/~XXXXXX/html.htgroup
AuthName "Private"
require group mates

I have the above placed in my /html/images directory?


This .htpasswd is placed in the root directory /~XXXXXX along with the .htgroup
.htpasswd

XXXXXX:dx2HeVnhi6j4.

The problem I have is....I can get the logon window to come up but when I type in the username/password it won't let me get to that specific folder....../images
Login window just keeps popping up.

first time I've tried this so any advice would be great???

TIA
  Reply With Quote
Old 12-04-2004, 09:01 PM   #8
mbottrell
 
Posts: n/a
Yeah...

The problem you have is the definition of AuthGroupFile and AuthFile.

They are fully qualified paths to the file on the webserver... NOT a URL!

Change them to read something like:

/home/#ADSL_NUMBER/WEB-USER/ instead... all should then be good.

If the login keeps popping up... it's a sure sign that it has not worked if you have the user/password incorrect.

Cheers,

Matt.
  Reply With Quote
Old 25-05-2004, 10:27 PM   #9
soulscraaper86
 
Posts: n/a
i'm using microsoft frontpage 2002 and i'm wondering how to Password protect my webspace. Thanks in advance for any help
  Reply With Quote
Old 26-05-2004, 12:20 AM   #10
mbottrell
 
Posts: n/a
Read above..

This isn't a HTML editor issue..but something you need to do on the SERVER.
Has nothing to do with Frontpage.

Read the information above in this thread... it has all the information you require.

Good luck!

Regards,

Matt.
  Reply With Quote
Old 26-05-2004, 10:05 PM   #11
soulscraaper86
 
Posts: n/a
still dun understand...how do you get into the live webspace path and how to "do" something to the server, i'm so blur.
  Reply With Quote
Old 27-05-2004, 12:37 PM   #12
mbottrell
 
Posts: n/a
Use FTP.

Read above to use the tools above to create your password file.

Upload both .htaccess and htpasswd files as required.

Cheers,

Matt.
  Reply With Quote
Old 01-06-2004, 06:48 PM   #13
MrShadow
Grand Poh Bah
 
MrShadow's Avatar
 
Join Date: Mar 2004
Location: Central Coast, NSW
Posts: 109
OK, I'm having some problems with my .htaccess file. Below is the contents:

DirectoryIndex fm.php

<Files .htaccess>
order deny,allow
deny from all
</Files>

I always get an Internal Server Error 500. I think it's with the DirectoryIndex line, as I removed the stuff to block .htaccess

Any suggestions? The file was:

Created in Textpad (with name New Text.txt)
Uploaded in ASCII mode
Renamed via WSFTP Pro to .htaccess

Thanks
Gaz
__________________
<img src="http://www.danasoft.com/sig/Dag-Net.jpg" alt="sig" />
MrShadow is offline   Reply With Quote
Old 02-06-2004, 05:16 AM   #14
mbottrell
 
Posts: n/a
Actually it's probably ALL the lines.
Refer to the postings above. (You only need the settings for auth there... the rest will be done at the directory level for you.

I also create an index.php that just meta refreshes to the fm.php in this example.

So you can use http://my.space.swiftdsl.com.au/fm/ and it works.

Cheers,

Matt.
  Reply With Quote
Old 02-06-2004, 09:56 AM   #15
MrShadow
Grand Poh Bah
 
MrShadow's Avatar
 
Join Date: Mar 2004
Location: Central Coast, NSW
Posts: 109
Hmm, thanks. I was hoping I wouldn't have to do that. Oh, well. I might just copy fm.php to index.php, as I've already linked to fm.php at various other places (and then realised I should have called it index.php. Mabey I should plan things better).
__________________
<img src="http://www.danasoft.com/sig/Dag-Net.jpg" alt="sig" />
MrShadow is offline   Reply With Quote
Old 03-06-2004, 06:43 AM   #16
mbottrell
 
Posts: n/a
Use a recursive search and replace fm.php for index.php.
  Reply With Quote
Old 03-06-2004, 12:05 PM   #17
Yusuf
 
Posts: n/a
The .htaccess and the .htpasswd files I upload seem to disappear

I have uploaded using WSFTP and IE. The files initially appear, but when I refresh or re-get the directory listing the files disappear.

Bizzarrrreeee....

I have been trying to get basic user-password protection with no luck. The only reference seems to be the sketchy post in this forum. A more organised presentation with examples would be much better.

Cheers,
  Reply With Quote
Old 03-06-2004, 02:21 PM   #18
mbottrell
 
Posts: n/a
Any file that commences with a . (dot) in UNIX is seen as a 'hidden file' (Hmm. bit of a pun there! )

This is why you won't see it by default.

In a text based FTP client you can issue:
Code:
ls -a
to include hidden files in a listing.
Many graphical FTP programs also have an option to 'view hidden files'.

Cheers,

Matt.
  Reply With Quote
Old 03-06-2004, 03:03 PM   #19
Yusuf
 
Posts: n/a
Quote:
Originally posted by mbottrell
In a text based FTP client you can issue:
Code:
ls -a
to include hidden files in a listing.
No on ftp.swiftdsl.com.au
Code:
ls
200 PORT command successful
150 Connecting to port 35246
Splitter.exe
index.html
phpMyAdmin
strata
226 4 matches total
46 bytes received in 0.0067 seconds (6.66 Kbytes/s)
ftp> ls -al
200 PORT command successful
150 Connecting to port 35265
226 0 matches total
ftp> ls -a
200 PORT command successful
150 Connecting to port 35290
226 0 matches total
ftp> dir
200 PORT command successful
150 Connecting to port 35312
-rwxr-----    1 14027    dslweb      59392 Jan 26 16:27 Splitter.exe
-rwxr-----    1 14027    dslweb         27 Sep 15  2003 index.html
drwxr-x---    7 14027    dslweb       4096 Jun  3 10:23 phpMyAdmin
drwxr-x---    4 14027    dslweb       4096 Jun  3 12:41 strata
226-Options: -l
226 4 matches total
270 bytes received in 0.46 seconds (0.57 Kbytes/s)
  Reply With Quote
Old 04-06-2004, 07:40 AM   #20
mbottrell
 
Posts: n/a
Don't use Windows's command line FTP ... it's brain dead...

You will get hidden listings using ls -al
See below:
Code:
OK. Current restricted directory is /
Logged in to ftp.swiftdsl.com.au.                                               
ncftp / > dir
drwxr-xr-x                May  4 23:35   html
ncftp / > ls -al
drwxr-x---    3 20637    dslweb       4096 May 12 10:44 .
drwxr-x---    3 20637    dslweb       4096 May 12 10:44 ..
-rw-------    1 20637    dslweb         11 May 12 10:44 .ftpquota
drwxr-xr-x    5 20637    dslweb       4096 May  5 07:35 html
Take a look at Core FTP It's free for the lite version and will let you see all these files as well it has a built in .htaccess/.htpassword editor.

Cheers,

Matt.
  Reply With Quote
Old 17-06-2004, 01:18 AM   #21
Soliah
 
Posts: n/a
This just refuses to work for me:


.htaccess
Code:
AuthUserFile /swiftdsl/#########/~MAILBOX/.htpasswd
AuthName "Login:"
AuthType Basic
Require valid-user
This was placed in a empty directory.

.htpasswd
Code:
XXX:$apr1$Dv1.....$iv6wjRh55mrvvWVrb94Rb
This was placed in the root /~MAILBOX/ directory.

The login just keeps on popping up
  Reply With Quote
Old 30-06-2004, 11:20 PM   #22
Luke200
 
Posts: n/a
.htaccess on domainweb server

Hello.

I'm still having trouble with the .htaccess file location using the format below:

/swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/html/

This is for a my 50MB web space account which is on the box domainweb.swiftel.com.au and with my registered domain name being hosted on it.

Is this format different if your domainname is hosted with Swiftel rather than the standard free space using the format above?

Luke
  Reply With Quote
Old 18-07-2004, 06:25 PM   #23
Seamus Warren
 
Posts: n/a
Re: .htaccess on domainweb server

Quote:
Originally posted by Luke200
Hello.

I'm still having trouble with the .htaccess file location using the format below:

/swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/html/
Did you sort it out? I want to upload a password protected DOCUMENTS folder.

Some SmartFTP tutorials on .htaccess: http://www.smartftp.com/support/kb/index.php/77

I'm checking 'em out now.

.htaccess password generator:
http://www.kxs.net/support/htaccess_pw.html
  Reply With Quote
Old 18-07-2004, 08:23 PM   #24
Seamus Warren
 
Posts: n/a
Who whoa! Looks like .htaccess is working for a "Documents" directory found here: http://home.swiftdsl.com.au/~cybernaut/

If you break in can you let me know how you did it and if there is a fix?

Thank you.
  Reply With Quote
Old 13-09-2004, 05:26 PM   #25
Bullet
 
Posts: n/a
webpage access

Hi Guys I have only just connected up with swiftel and I'm having trouble getting into my webspace, I used cuteftp pro to upload all the files and dir's that are needed to run my webpage and that worked like a charm

But when I go to access the website it cant be found ??? do I have to activate the webspace or is it just me having one of my days again LOL

thanks up front for any help guys
  Reply With Quote
Old 13-09-2004, 05:40 PM   #26
simmo inQ
 
Posts: n/a
hey bullet,

did you create the 'html' directory in your webspace?
if not, you should create it in the root directory of your webspace.

and in answer to your question, no you do not need to activate your webspace. however, when you first created your email account for use with the webspace, did you make sure that your email acount is selected for use with the webspace account? if not, go to the configure mail of the members.swiftdsl.com.au section (you ahve to login) and select from the dropdown menu, the email account you want to use the webspace with.

hope i havent confused you

simmo inQ
  Reply With Quote
Old 14-09-2004, 02:26 AM   #27
mbottrell
 
Posts: n/a
Bullet,

You need to 'activate' your webspace in the 'members' area. Look under the Email accounts section. (confusing but true!)

So visit https://members.swiftdsl.com.au/

Once you have selected what account you want the webspace 'attached' to, you need to put all your html files in a directory called 'html' on the ftp://ftp.swiftdsl.com.au/ site.

Cheers,

Matt.
  Reply With Quote
Old 20-10-2004, 04:57 PM   #28
edgr
Registered User
 
Join Date: Oct 2004
Posts: 30
For anyone who is wondering (I had this problem myself and it took me a while to track it down), the fully qualified path does not need a tilda (~) in it.
edgr is offline   Reply With Quote
Old 20-10-2004, 05:03 PM   #29
PT_Richard
Administrator
 
PT_Richard's Avatar
 
Join Date: Sep 2003
Posts: 754
Web-mailbox

Live Webspace Path:

/swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/html/
PT_Richard is offline   Reply With Quote
Old 15-01-2005, 05:36 PM   #30
simmo inQ
 
Posts: n/a
is /swiftdsl/10-DIGIT-ADSL#/WEB-MAILBOX/html/ our full webspace path?
  Reply With Quote
Old 29-04-2005, 10:47 AM   #31
Crash_Harry
 
Posts: n/a
Full Web Path

I have been reading the thread above and trying to figure out the steps to uploading .htaccess & /htpasswd files.

what goes in front of /swiftdsl/10 digit.......?

If I connect to ftp://username@ftp.swiftdsl.com.au am I in the root directory? I can see my website html folder ok.

Do I upload my .htpasswd file to this location?

How do I log in to create it directly using the -c -b coding as described above?

Thankyou for your guidance.
  Reply With Quote
Old 20-05-2005, 02:17 PM   #32
alisonh
 
Posts: n/a
How I got htaccess working ...

After much messing about, I figured out the path given above is wrong, and it should be something like this:

AuthType Basic
AuthName "My Secret Area"
AuthUserFile /swiftdsl/home/<your_phone_number>/<your_username>/html/.htpasswd
Require valid-user

I hope this helps others who spent far too long on something this simple.

And here's a web-based password generator:

http://www.4webhelp.net/us/password.php

Alison
  Reply With Quote
Old 23-05-2005, 08:47 AM   #33
PT_Ryan
Administrator
 
PT_Ryan's Avatar
 
Join Date: Jun 2003
Posts: 1,639
Nice tool that you have found.


Regards,
Ryan.
PT_Ryan is offline   Reply With Quote
Old 19-07-2005, 10:57 PM   #34
Cryonics
 
Posts: n/a
Hi,

I'm one of PT's "Unwired" subscribers, and as such the <your_phone_number> part of the directory wont be applicable to me.

On my web space on PT's servers, what would I substitute the phone number with?


"AuthUserFile /swiftdsl/home/<your_phone_number>/<your_username>/html/.htpasswd"


Just a bit of background on what I've tried so far:

My .htaccess file:

AuthName "Secure Site"
AuthType Basic
AuthUserFile /html/secure/.htpasswd
Require valid-user

I also have my .htpasswd file under the same directory as the .htaccess.
I have a file named index.html under the /html/secure directory.

I have a main index.html under my /html/ directory. On this page, I have a link to my /html/secure/ directory. When there are no .htaccess files in use, the link works fine, and I can get to the index.html in the /html/secure/ directory.

After I upload the .htaccess and .htpasswd files into the /html/secure/ dirrectory, and then click the link to the "secure" page, I get prompted for a username and password, although it will not accept the credentials in the .htpasswd file.

I have tried 2 different .htaccess password generators, including the one linked above, but I still get stuck at this point.

Would this be related to the ADSL Service number part of the directory (which I don't have), or am I doing something wrong.

Any hints or further information would be appreciated.

Thanks.
  Reply With Quote
Old 20-07-2005, 09:47 AM   #35
PT_Richard
Administrator
 
PT_Richard's Avatar
 
Join Date: Sep 2003
Posts: 754
Quote:
Originally Posted by Cryonics
Hi,

I'm one of PT's "Unwired" subscribers, and as such the <your_phone_number> part of the directory wont be applicable to me.

On my web space on PT's servers, what would I substitute the phone number with?


"AuthUserFile /swiftdsl/<your_phone_number>/<your_username>/html/.htpasswd"
I suggest:

/swiftdsl/(10-DIGIT-ADSL#) or (UNWIRED_USERNAME)/WEB-MAILBOX (<your_username>)/.htpasswd

As the below is in the live document root (typically files named .htpasswd are denied by server directives)

/swiftdsl/<your_phone_number>/<your_username>/html/.htpasswd

Regards,

Richard
PT_Richard is offline   Reply With Quote
Old 22-07-2005, 12:28 AM   #36
Cryonics
 
Posts: n/a
Richard,

Your suggestion works.

Thankyou for your help.
  Reply With Quote
Old 30-03-2006, 09:25 AM   #37
sts.cadcam
Registered User
 
Join Date: Mar 2006
Location: Drouin
Posts: 2
Question is there any restruction on using .htaccess

I'm trying to use "ErrorDocument" and "Options -Indexes" on htaccess but it return me with 500 server error. is there some restruction on htaccess?
sts.cadcam is offline   Reply With Quote
Old 22-02-2007, 09:12 PM   #38
lastminute
Registered User
 
Join Date: Feb 2007
Posts: 1
Hi sts.cadcam,

From memory there is a restriction on what you can do with the .htaccess files. I believe PT put it down to a security issue.

Now on to my question: Why have all my attempts at .htaccess password protection failed? I have tried every possibility i can think off. Here is how my .htaccess file currently looks:

Quote:
AuthName "Admin Only Area"
AuthType Basic
AuthUserFile /swiftdsl/home/<adsl num>/<user>/.htpasswd

require user admin
Can anyone see whats wrong with it? I have the .htpasswd file where the .htaccess file is pointing to, but it doesn't work. It pops up the pass word box fine when i go the directory i want to protect, but i can't log in.

Here's the .htpasswd file for reference:

Quote:
admin:bUURLowOxwMEI
Thanks in advance.

EDIT: I have also tried putting the .htpasswd file in the html folder, but it made no difference.

Last edited by lastminute : 22-02-2007 at 09:14 PM. Reason: Added extra info
lastminute is offline   Reply With Quote
Old 24-02-2007, 08:17 AM   #39
PT_Richard
Administrator
 
PT_Richard's Avatar
 
Join Date: Sep 2003
Posts: 754
Require valid-user

Require valid-user
PT_Richard is offline   Reply With Quote
Old 16-04-2008, 10:57 AM   #40
newUser
Registered User
 
Join Date: Apr 2008
Posts: 1
I am trying to install Drupal (CMS) but whatever directory contains the .htaccess file gives me the "500 Internal Server Error" when I try to view it. The actual directory itself can also not be seen when it contains this file and I am viewing from my ftp program. Eg if I create a folder test1 and move .htaccess to that folder, the folder itself when not appear in ftp program. If I then move .htaccess to folder test2, test1 now becomes visible and test2 can not be seen.

Any ideas?

Thanks.
newUser is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Database access now available Sysadmin Hosting 76 26-04-2010 01:56 AM
NB1300B default password? not password msaward Modems 8 18-06-2004 10:24 AM
Password Protected Web Space ? JCS_Sydney Hosting 2 16-04-2004 05:19 PM
website password protection using .htaccess and .htpasswd traveller_wa Hosting 3 21-09-2003 10:00 PM
Username/password not valid? Behzad General Support 1 20-09-2003 10:50 PM


All times are GMT +10. The time now is 09:56 AM.

Copyright ©2008
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.