Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




438 posts

Ultimate Geek


Topic # 143301 9-Apr-2014 19:22
Send private message

Hi Geekzone, 

I just would like to know if Im doing something wrong with my website development project.
I have the site live now but i want security enabled as my host has Apache server i went with .htaccess for security setup

I made a .htaccess file to secure a folder and request userid and password but using .htpasswd 
.htaccess file points to the right folder where both .htaccess and .htpasswd are for eg. /home/mysite/.htpasswd

my .htpasswd  contain just the   userid and passwords eg.     admin:sugarsweet

when i try to access those pages in the secure folder the login widget pops up but no matter how many times i add the correct user and password it does not let me access the folder.

so i guess my question will be do i need to add a script to the pages? i though all i need it to do was make this two files and point them to right place.


my .htaccess file code looks like this:

AuthType Basic
AuthName "My Protected Area"
AuthUserFile /home/mysite/.htpasswd
Require valid-user


any recommendations will be highly appretiated,

thank you all,


Andrew

Create new topic
85 posts

Master Geek
+1 received by user: 11


  Reply # 1022417 9-Apr-2014 19:28
One person supports this post
Send private message

You need something like this for the password in the .htpasswd file if you don't have command line access to the server.  The .htaccess file looks like it should work though.



438 posts

Ultimate Geek


  Reply # 1022545 9-Apr-2014 23:35
Send private message

thanks Jonovw, 

will give it another try i was using this http://www.htaccesstools.com/htpasswd-generator-windows/
a
nd it changes  the password that goes into the .htpasswd  so will see if works

does each user need a separate like and do i put a comma after each user?

thanks 


Andrew

 
 
 
 


2284 posts

Uber Geek
+1 received by user: 224


  Reply # 1022617 10-Apr-2014 08:44
Send private message

From memory it also has to be transferred to the server in the right FTP mode.

Forced ACSII if I recall, (not auto or binary) else it gets recoded in binary and can't be read :)



438 posts

Ultimate Geek


  Reply # 1023197 11-Apr-2014 01:25
Send private message

Oblivian thank you so much for reply and also to let me know about Forced ASCII transfer mode,

plus one of the problems was that i have is that the host support desk gave me the wrong path to the root of the domain but thanks to google
i found a php code that help me pull the full path to the .htpasswd and now all works perfectly.


thanks guys



Andrew

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Intel reimagines data centre storage with new 3D NAND SSDs
Posted 16-Feb-2018 15:21


Ground-breaking business programme begins in Hamilton
Posted 16-Feb-2018 10:18


Government to continue search for first Chief Technology Officer
Posted 12-Feb-2018 20:30


Time to take Appleā€™s iPad Pro seriously
Posted 12-Feb-2018 16:54


New Fujifilm X-A5 brings selfie features to mirrorless camera
Posted 9-Feb-2018 09:12


D-Link ANZ expands connected smart home with new HD Wi-Fi cameras
Posted 9-Feb-2018 09:01


Dragon Professional for Mac V6: Near perfect dictation
Posted 9-Feb-2018 08:26


OPPO announces R11s with claims to be the picture perfect smartphone
Posted 2-Feb-2018 13:28


Vocus Communications wins a place on the TaaS panel
Posted 26-Jan-2018 15:16


SwipedOn raises $1 million capital
Posted 26-Jan-2018 15:15


Slingshot offers unlimited gigabit fibre for under a ton
Posted 25-Jan-2018 13:51


Spark doubles down on wireless broadband
Posted 24-Jan-2018 15:44


New Zealand's IT industry in 2018 and beyond
Posted 22-Jan-2018 12:50


Introducing your new workplace headache: Gen Z
Posted 22-Jan-2018 12:45


Jucy set to introduce electric campervan fleet
Posted 22-Jan-2018 12:41



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.