can't print backslash on this forum

its c: \ inetpub \ ....

    ok, sorry. I didn't know that thing with the backslashes.

    my own htaccess files look like this:

    AuthName        "Web Database Access"
    AuthType        Basic
    AuthUserFile    /wwwroot/include/.htpasswd
    
    <Limit GET POST PUT>
    require valid-user
    </Limit>
    

    maybe it's the missing "<limit>" that causes your problems?

      still it does not work... 🙁

      
      AuthName        "Web Database Access"
      AuthType        Basic
      AuthUserFile  C:/Inetpub/php-bin/.htpasswd
      
      <Limit GET POST PUT>
      require valid-user
      </Limit>
      
      

      I tried both slash and backslash

        Did you create the .htpasswd file on the Windows machine or did you just copy the .htpasswd file from your Linux box?

          Originally posted by jerdo
          Did you create the .htpasswd file on the Windows machine or did you just copy the .htpasswd file from your Linux box?

          windows machine. please note that the directory i want to protect is an alias...

            How about this:

            AuthUserFile "C:\Inetpub\php-bin.htpasswd"

            And what do you mean it's an alias?

              Originally posted by brad_fears
              How about this:

              AuthUserFile "C:\Inetpub\php-bin.htpasswd"

              And what do you mean it's an alias?

              it does not work 🙁

              what i mean is /php-bin/ path is outside of my wwwroot. My WWWROOT directory is c:\inetpub\wwwroot\ while /php-bin/ path is on c:\inetpub\php-bin\

                I'm looking over my own .htaccess files, and the only difference is that I don't use the <limit> tags. I also specify a particular user.

                AuthName "Web Database Access"
                AuthType Basic
                AuthUserFile "C:/Inetpub/php-bin/.htpasswd"
                require user <specify username>

                  it does not work 🙁

                  do i have to change my httpd.conf file?
                  <directory>
                  </directory>

                    That depends -- what's in your <directory> for the directory in question?

                    Mine has something like this:

                    <Directory "C:/Inetpub/php-bin">
                    Options Indexes MultiViews
                    AllowOverride FileInfo AuthConfig Limit Options
                    Order deny,allow
                    Deny from all
                    Allow from <ipaddress or mask>
                    </Directory>

                      thanks! finally... the system had prompted for username 🙂

                      but it rejects my password 🙁

                        What happens if you reset the password? If that doesn't work, what did your <directory> end up looking like?

                          i used this codes on my httpd.conf

                          <Directory "C:/Inetpub/php-bin">
                          Options Indexes MultiViews
                          AllowOverride FileInfo AuthConfig Limit Options
                          Order deny,allow
                          Deny from all
                          Allow from <ipaddress or mask>
                          </Directory>

                          what do you mean by "What happens if you reset the password?" ?

                            I'm assuming you have the correct ip address or address mask in place of the <ip address or mask>...

                            As for resetting your password, I meant using the 'htpasswd' script to change the password of the user account you're going to access with. It's in the Apache documentation. In fact, everything we've pointed out here is in the documentation. Have you read the documentation?

                              Hi,

                              can you access the apache configuration (httpd.conf) ? You can then configure the access restrictions directly in the httpd.conf (in a Directory or a Location section)

                                yes if you are the system administrator...

                                  Write a Reply...