Authentication Required

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobertFleming
    Junior Member
    • Oct 2015
    • 7

    Authentication Required

    I've got a 401 triggering a popup anytime my user info (I'm the admin) is needed on a page.

    This is a fresh install on a LAMP server with SSH.

    I am aware that this is a fairly common problem and has something to do with the server config most of the time. However, I'm not sure where to start.

    Attached is a PHP info dump.


    Thanks!
    Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!
  • tarasm
    Super Moderator
    • Mar 2014
    • 573

    #2
    Please check if in your config file defined the following:
    Code:
    <Directory PATH_TO_ESPOCRM>
    ....
        AllowOverride All
    ...    
    </Directory>
    It can be defined in /etc/apache2/sites-available/default-ssl.conf or in your custom virtual host.
    Job Offers and Requests

    Comment

    • RobertFleming
      Junior Member
      • Oct 2015
      • 7

      #3
      I did some digging and I don't have that option available. I am hosting this on 1and1's servers. Is there another way around it?

      I have created a sub user that will allow you to see more. Let me know if you'd like to try it and I'll pm you with the login.

      Comment

      • RobertFleming
        Junior Member
        • Oct 2015
        • 7

        #4
        This is what shows up in the console

        Code:
        GET http://root:***@***.com/crm/api/v1/ 401 (Unauthorized)(anonymous function) @ VM5715:409handleProcess @ VM5715:418(anonymous function) @ VM5715:425(anonymous function) @ espo.min.js?r=1443614859674:5(anonymous function) @ espo.min.js?r=1443614859674:4_ @ espo.min.js?r=1443614859674:5m @ espo.min.js?r=1443614859674:5f @ espo.min.js?r=1443614859674:5l.trigger @ espo.min.js?r=1443614859674:5$.ajax.success @ VM5720:126j @ espo.min.js?r=1443614859674:3k.fireWith @ espo.min.js?r=1443614859674:3x @ espo.min.js?r=1443614859674:4(anonymous function) @ espo.min.js?r=1443614859674:4
        ****.com/:1
        GET http://****.com/crm/?entryPoint=avatar&size=small&id=1&t=1445285484075 401 (Unauthorized)
        The first GET request error shows up on page load, the second after the authentication required dialog is closed...it is related to the avatar.

        Comment

        • tarasm
          Super Moderator
          • Mar 2014
          • 573

          #5
          Found the problem. FastCGI does not support HTTP AUTH by the default.
          The solution is add to the Virtual Host the following code:
          For fcgid module:
          Code:
          <IfModule mod_fcgid.c>
            FcgidPassHeader Authorization
            FcgidPassHeader Proxy-Authorization
            FcgidPassHeader HTTP_AUTHORIZATION  
          </IfModule>
          For fastcgi module:
          Code:
          <IfModule mod_fastcgi.c>
             FastCgiConfig -pass-header Authorization \
                                  -pass-header Proxy-Authorization \
                                  -pass-header HTTP_AUTHORIZATION  
          </IfModule>
          To check which module apache is currently uses, run this command and find the module:
          Code:
          apache2ctl -M
          Job Offers and Requests

          Comment

          • RobertFleming
            Junior Member
            • Oct 2015
            • 7

            #6
            I don't have root access. I am on a shared hosting server.

            Is there a workaround?

            Comment

            • RobertFleming
              Junior Member
              • Oct 2015
              • 7

              #7
              Would setting EspoCRM's Administration>Authentication Method to LDAP help here? I know next to nothing about it, much less configuring it.

              Comment

              • yuri
                Member
                • Mar 2014
                • 8454

                #8
                LDAP is not what you need.
                If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                Comment

                • tarasm
                  Super Moderator
                  • Mar 2014
                  • 573

                  #9
                  Please ask your hosting support to enable the HTTP_AUTHORIZATION.
                  Job Offers and Requests

                  Comment

                  • bruce185
                    Member
                    • Feb 2016
                    • 71

                    #10
                    I'm getting this error on 4.2.5 and although the server is running mod_cgi, and auth_basic is also biult into the compile: as below...

                    Any ideas why this error might be occurring?

                    Loaded Modules:
                    core_module (static)
                    so_module (static)
                    http_module (static)
                    mpm_prefork_module (shared)
                    cgi_module (shared)
                    access_compat_module (shared)
                    actions_module (shared)
                    alias_module (shared)
                    auth_basic_module (shared)
                    authn_core_module (shared)
                    authn_file_module (shared)
                    authz_core_module (shared)
                    authz_groupfile_module (shared)
                    authz_host_module (shared)
                    authz_user_module (shared)
                    autoindex_module (shared)
                    dav_module (shared)
                    deflate_module (shared)
                    dir_module (shared)
                    expires_module (shared)
                    filter_module (shared)
                    headers_module (shared)
                    imagemap_module (shared)
                    include_module (shared)
                    log_config_module (shared)
                    logio_module (shared)
                    mime_module (shared)
                    negotiation_module (shared)
                    proxy_module (shared)
                    proxy_fcgi_module (shared)
                    proxy_http_module (shared)
                    rewrite_module (shared)
                    setenvif_module (shared)
                    slotmem_shm_module (shared)
                    socache_dbm_module (shared)
                    socache_shmcb_module (shared)
                    status_module (shared)
                    unique_id_module (shared)
                    unixd_module (shared)
                    userdir_module (shared)
                    ssl_module (shared)
                    bwlimited_module (shared)
                    security2_module (shared)
                    ruid2_module (shared)

                    Comment

                    Working...