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

 
 
 
 


Try Wrike: fast, easy, and efficient project collaboration software
2427 posts

Uber Geek
+1 received by user: 246


  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 »

Amazon launches the International Shopping Experience in the Amazon Shopping App
Posted 19-Apr-2018 08:38


Spark New Zealand and TVNZ to bring coverage of Rugby World Cup 2019
Posted 16-Apr-2018 06:55


How Google can seize Microsoft Office crown
Posted 14-Apr-2018 11:08


How back office transformation drives IRD efficiency
Posted 12-Apr-2018 21:15


iPod laws in a smartphone world: will we ever get copyright right?
Posted 12-Apr-2018 21:13


Lightbox service using big data and analytics to learn more about customers
Posted 9-Apr-2018 12:11


111 mobile caller location extended to iOS
Posted 6-Apr-2018 13:50


Huawei announces the HUAWEI P20 series
Posted 29-Mar-2018 11:41


Symantec Internet Security Threat Report shows increased endpoint technology risks
Posted 26-Mar-2018 18:29


Spark switches on long-range IoT network across New Zealand
Posted 26-Mar-2018 18:22


Stuff Pix enters streaming video market
Posted 21-Mar-2018 09:18


Windows no longer Microsoft’s main focus
Posted 13-Mar-2018 07:47


Why phone makers are obsessed with cameras
Posted 11-Mar-2018 12:25


New Zealand Adopts International Open Data Charter
Posted 3-Mar-2018 12:48


Shipments tumble as NZ phone upgrades slow
Posted 2-Mar-2018 11:48



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.