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

 
 
 
 


2014 posts

Uber Geek
+1 received by user: 166


  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 »

FUJIFILM introduces X-E3 mirrorless camera with wireless connectivity
Posted 18-Sep-2017 13:53


Vodafone announces new plans with bigger data bundles
Posted 15-Sep-2017 10:51


Skinny launches phone with support for te reo Maori
Posted 14-Sep-2017 08:39


If Vodafone dropping mail worries you, you’re doing online wrong
Posted 11-Sep-2017 13:54


Vodafone New Zealand deploy live 400 gigabit system
Posted 11-Sep-2017 11:07


OPPO camera phones now available at PB Tech
Posted 11-Sep-2017 09:56


Norton Wi-Fi Privacy — Easy, flawed VPN
Posted 11-Sep-2017 09:48


Lenovo reveals new ThinkPad A Series
Posted 8-Sep-2017 14:37


Huawei passes Apple for the first time to capture the second spot globally
Posted 8-Sep-2017 10:45


Vodafone initiative enhances te reo Maori pronunciation on Google Maps
Posted 8-Sep-2017 10:40


Voyager Internet expand local internet phone services company with Conversant acquisition
Posted 6-Sep-2017 18:27


NOW Expands in to Tauranga
Posted 5-Sep-2017 18:16


Windows 10 Fall Creators Update coming Oct. 17
Posted 4-Sep-2017 14:10


Garmin introduce Garmin vivoactive 3
Posted 1-Sep-2017 18:38


Kiwibank wastes $90 million on software – Reseller News
Posted 1-Sep-2017 13:45



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.