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

 
 
 
 


1877 posts

Uber Geek
+1 received by user: 145


  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 »

Nothing nebulous about Microsoft’s cloud-transition
Posted 21-Jul-2017 15:34


We’re spending more on tech, but not as much as Australians
Posted 21-Jul-2017 11:43


Endace announces EndaceFabric for network-wide packet recording
Posted 20-Jul-2017 20:49


Acorn 6: MacOS image editing for the rest of us
Posted 20-Jul-2017 17:04


HTC faces backlash over keyboard pop-up ads
Posted 19-Jul-2017 15:53


BNZ adds Visa credit cards to Android Pay wallet
Posted 18-Jul-2017 19:44


Still living in a Notification hell – Om Malik
Posted 18-Jul-2017 13:00


Duet Display uses iPad to extend Mac, PC
Posted 18-Jul-2017 10:58


PC sales could be worse
Posted 17-Jul-2017 07:34


Crypto-currencies, tulips, market bubbles
Posted 17-Jul-2017 06:38


NZ Tech Podcast: Big batteries, solar cars, cold war, IoT
Posted 16-Jul-2017 16:53


Vodafone Australia mulls Wisp alliance, NZ implications
Posted 13-Jul-2017 16:49


Rural health professionals see fibre pay-off
Posted 13-Jul-2017 11:52


Vodafone announces expansion of $5 Daily Roaming
Posted 13-Jul-2017 10:20


Intel unveils powerful Intel Xeon Scalable processors
Posted 12-Jul-2017 20: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.