Solved

Managing .htaccess

Posted on 2011-03-05
14
507 Views
Last Modified: 2012-05-11
Can anyone recommend a good web/php front end for managing .htaccess and .htapasswd files? I would be willing to pay a licence fee.
0
Comment
Question by:cescentman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 3
14 Comments
 
LVL 12

Expert Comment

by:Amick
ID: 35043242
DirectoryPass is an open source program that probably will do what you want.
http://www.directorypass.com/
0
 
LVL 12

Accepted Solution

by:
Amick earned 125 total points
ID: 35043248
Here are some additional options: http://sourceforge.net/search/?q=.htaccess+management
0
 
LVL 1

Author Comment

by:cescentman
ID: 35044519
Thanks for the replies. Have you any experience of these programs. I have already seen them in searches I have done. I'm looking to recommendations.
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Expert Comment

by:PeggyOCO
ID: 35044979
There are a number of these .htaccess and .htpasswd generators online that are very handy to use, but you need to know what it is you are making, and where to put the files.  Here is a nice one I have used before: http://www.htaccesseditor.com/en.shtml#a_basic
That link takes you to the Basic Access .htaccess and .htpasswd page.  But what is it exactly that you are making?  And what do you do with it once you have made it?  Here's what I do.  I am presuming you want to restrict access to a folder on your website so that the visitor has to put in a username and a password in order to see what is inside the folder.  First, inside the folder you wish to protect, create a file named htaccess, WITHOUT the dot in front of it!  Then create a file named htpasswd, also without the dot in front of it.  The reason for doing this is because once you put the dot in front of the name of the file, that file becomes a hidden file, and some ftp programs don't allow you to see these files.  So you want to be able to put some code in these files, before you put the dot in front of the name.
So, go to the Basic Authentication at the website url I pasted earlier, and the first thing you are going to do is prepare your htpasswd.  For instance, I put in admin for the username, and secret for the password.  The form then filled in this:  admin:6ge9bh2S2rdNQ   This is what you copy and paste into the htpasswd file you made on your website.  Then the form asks you for the path to your .htpasswd file.  This has to be the FULL PATH.  Usually, in your FTP program you can see the full path to the directory where your .htpasswd file is going to be kept.  You can put it anywhere you wish.   Once you put in the full path, this generator creates all the code that has to go into your htaccess file.  I just did it and I'm pasting it in here:
<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
AuthUserFile /home/yourdomain/yourfolder/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your ID and password"
AuthType Basic
require valid-user
order deny,allow

Yours will be different, but it will look like this.  Paste all of this code into your htaccess file.  
Now you have pasted in all the right stuff to both your htaccess file and your htpasswd file.  Once you are done, change the name of htaccess to .htaccess  That is, put a dot in front of the name htaccess. Do the same for htpasswd.  Change the name of htpasswd to .htpasswd  Depending on your ftp program settings, these files might disappear from view (because of the dot) but don't worry, they are there.  Then, with a web browser, go to the folder you just protected and you should see a little box pop up that asks you for your user/pass.
0
 
LVL 1

Author Comment

by:cescentman
ID: 35044992
PeggyOCO thanks for the info. I am in fact after a web interface to give to users so they can manage their access without generating the .htaccess and .htpasswd files manually. I agree there are a number of solutions around hence me seeking recommendations in the hope that I can shorten the list of candidates to check out.
0
 

Expert Comment

by:PeggyOCO
ID: 35045033
Oh, I see.  I misunderstood the question then.  Sounds to me like you need a program to run on your server that will allow your users to create their .htaccess and .htpasswd files without them having to ftp anything up or do anything other than just fill out a form.  The program would have to write the files and put them in the right place.  Are you using php on your webserver?
0
 
LVL 1

Author Comment

by:cescentman
ID: 35045040
Yes PHP
0
 

Expert Comment

by:PeggyOCO
ID: 35045055
I just uploaded a zip file (above).This is a highly rated class from phpclasses.org which contains the methods for managing htaccess files. A php program could be written fairly easily using this class.
0
 

Expert Comment

by:PeggyOCO
ID: 35045092
Here's another possiblity.  WebMin is a very good open source control panel.  Along with it you get Usermin.  Usermin allows the users to manage their stuff -- among the things they can manage is htaccess files.  I've supplied Usermin for some clients and the response was good.  Usermin is pretty easy to use.  Webmin, for the administrator, is more complex, however, more powerful than CPanel.
0
 
LVL 1

Author Comment

by:cescentman
ID: 35046006
Thanks for the suggestions. Webmin is definitely out as it is too complex. I merely need a way to manage .htaccess files. As I said I am looking for a front end. I could code but wanted to know if anyone had experience of any of the offerings online.
0
 
LVL 12

Expert Comment

by:Amick
ID: 35057923
Directorypass is easy to install and easy to use.  It is definitely valuable for quickly adding protection to a directory and managing users by directory.

Although it is highly reviewed on the net and well thought of by sysadmins,  it is a perl cgi script, and some people have an aversion to that.  If that isn't a deal-breaker for you, though, it couldn't hurt to give it a try.
0
 
LVL 1

Author Comment

by:cescentman
ID: 35058248
I was unable to get online this morning to update this question due the maintaneace on EEX. In the absence of recommendations I decided on a product called htprotector on Sourceforge. I did in fact look at DirectoryPass too. Nothing against Perl but it turns out it is awkward to set up if you want to protect the program itself with basic authentication as some severs are configured not to allow .htaccess in the cgi-bin folder..
0
 
LVL 1

Author Closing Comment

by:cescentman
ID: 35058401
My request was for recommendations
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
What You Need to Know when Searching for a Webhost Provider
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question