Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by Anonymous (not registered) on Mon, 2011-08-08 22:55.

Below is not working when i try to authenticate using authmysql (website works fine otherwise)

<VirtualHost *:80>
    ServerName mywebsite.com
    ServerAlias www.mywebsite.com
    ServerAdmin webadmin@mywebsite.com
    ServerSignature Off
    DocumentRoot /var/www/mywebsite.com/www

    <Directory />
        Options +FollowSymLinks
        AllowOverride AuthConfig Options FileInfo Limit
       Order allow,deny
        Allow from all

    # Standard auth stuff
    AuthType Basic
    AuthName "Please authenticate"
    AuthBasicAuthoritative Off
    AuthUserFile /dev/null
    ## mod auth_mysql
    AuthMYSQL on
    AuthMySQL_Authoritative on
    AuthMySQL_DB mywebsitedb
    AuthMySQL_Host localhost
    AuthMySQL_User mywebuser
    AuthMySQL_Password mywebuserpass
    AuthMySQL_Password_Table mywebusers
    AuthMySQL_Username_Field userid
    AuthMySQL_Password_Field userpass
    AuthMySQL_Empty_Passwords off
    AuthMySQL_Encryption_Types SHA1Sum

    Require valid-user
    </Directory>
    <Directory /var/www/mywebsite.com/www/>
        Options +FollowSymLinks +MultiViews +Includes
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /var/www/mywebsite.com/cgi-bin/
    <Directory "/var/www/mywebsite.com/cgi-bin/">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +Includes
        AddHandler cgi-script cgi pl
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    DirectoryIndex /cgi-bin/index.pl

</VirtualHost>

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.