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

 
 
 
 


2113 posts

Uber Geek
+1 received by user: 188


  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 »

New Zealand Ministry of Education chooses Unisys for cloud-based education resourcing management system
Posted 22-Nov-2017 22:00


Business analytics software powers profits for NZ wine producers
Posted 22-Nov-2017 21:52


Pyrios strikes up alliance with Microsoft integrator UC Logiq
Posted 22-Nov-2017 21:51


The New Zealand IT services ecosystem - it's all digital down here
Posted 22-Nov-2017 21:49


Volvo to supply tens of thousands of autonomous drive compatible cars to Uber
Posted 22-Nov-2017 21:46


From small to medium and beyond: Navigating the ERP battlefield
Posted 21-Nov-2017 21:12


Business owners: ERP software selection starts (and finishes) with you
Posted 21-Nov-2017 21:11


Why I'm not an early adopter
Posted 21-Nov-2017 10:39


Netatmo launches smart home products in New Zealand
Posted 20-Nov-2017 20:06


Huawei Mate 10: Punchy, long battery life, artificial intelligence
Posted 20-Nov-2017 16:30


Propel launch Disney Star Wars Laser Battle Drones
Posted 19-Nov-2017 21:26


UFB killer app: Speed
Posted 17-Nov-2017 17:01


The case for RSS — MacSparky
Posted 13-Nov-2017 14:35


WordPress and Indieweb: Take control of your online presence — 6:30 GridAKL Nov 30
Posted 11-Nov-2017 13:43


Chorus reveals technology upgrade for schools, students
Posted 10-Nov-2017 10:28



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.