htaccess password protection and htpasswd file generator

With AuthPro you can easily setup and manage .htaccess password protection on your website to generate and synchronize .htpasswd file records with your active members list.

How it works
You will need to upload our PHP script which will create basic .htaccess config file and generate actual .htpasswd password file with your AuthPro members list.
If you have another script or application which manages usernames in your .htpasswd file set $sync_htpasswd config variable to true

Requirements

  • Web server which supports .htaccess file directives (Apache)
  • Basic PHP scripting language support

Installation

  1. Download php script here

  2. Open downloaded script in any text editor and complete configuration section:
  3. $account='Your Authpro account username';
    $api_key='Your Authpro account API key';
    
    $folder_name='Members area';
    $folder_path[0]='/home/example/www/members/'; // Primary path, must be defined
    $folder_path[1]=''; // specify additional folders if needed
    
    $force_htaccess=true; // force creting .htaccess file if it does not exists
    $sync_htpasswd=false; // set true to check primary htpasswd file for updates and sync them with AuthPro account members
    
    • specify your AuthPro account username and API key in $account and $api_key variables
    • type your members area folder path at $folder_path[0] variable
    • if you want to protect multiple folders on your website you can specify them using $folder_path[1], $folder_path[2], etc.. variables

  4. Upload configured PHP script to your website

  5. Check if uploaded script is working properly by opening it's url in browser

  6. Inject uploaded PHP script in your website HTML code by adding script tag:
  7. <script src="http://www.example.com/authpro.php"></script>
    (use actual URL of uploaded AuthPro script on your website in script code).


Please contact us if you have any questions.

Don't have an AuthPro account yet? Sign Up now!