Announcement

Collapse
No announcement yet.

401 Unauthorized after applying RewriteBasePath

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 401 Unauthorized after applying RewriteBasePath

    As I described earlier in this (https://forum.espocrm.com/forum/inst...after-login​) post, I last upgraded from v6 to v7 and ran into the error of getting a 404 without doing anything, but then after applying the RewriteBasePath rule from the Apache documentation I got the 401 Unauthorized error.

    Since I had been working on it for so long without success, I created a new instance (v 7.2.7), but after installing it shows exactly the same error behavior.

  • #2
    Hi arrestthepresident,

    Please provide screenshots that describe this issue, EspoCRM logs (you can find it in [your_instance_directory]/data/logs) and information about MySQL and PHP versions.
    Thus, it will be possible to help you solve this issue faster and more efficiently.

    Also, please read the instructions for setting up an Apache server for EspoCRM: https://docs.espocrm.com/administrat...configuration/.

    Comment


    • #3
      i have errors post upgrade (v6->7) but also in a fresh install of v7.:

      *[2022-11-16 09:54:05] ERROR: 404 Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Not found. File: /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php Line: 91 Trace: #0 /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(58): Slim\Middleware\RoutingMiddleware->performRouting() EspoCRM Forum /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process() Forum /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #3 /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process() #4 /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() Groups /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle() Uncategorized Groups /mnt/web202/a1/26/511478826/htdocs/apps/crm/vendor/slim/slim/Slim/App.php(199): Slim\App->handle() Special /mnt/web202/a1/26/511478826/htdocs/apps/crm/application/Espo/Core/Api/Starter.php(79): Slim\App->run() Visitor Messages /mnt/web202/a1/26/511478826/htdocs/apps/crm/application/Espo/Core/ApplicationRunners/Api.php(49): Espo\Core\Api\Starter->start() Private Messages /mnt/web202/a1/26/511478826/htdocs/apps/crm/application/Espo/Core/Application/RunnerRunner.php(85): Espo\Core\ApplicationRunners\Api->run() Albums /mnt/web202/a1/26/511478826/htdocs/apps/crm/application/Espo/Core/Application.php(81): Espo\Core\Application\RunnerRunner->run() #11 /mnt/web202/a1/26/511478826/htdocs/apps/crm/public/api/v1/index.php(37): Espo\Core\Application->run() #12 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor. [] []
      *


      In the Frontent I get the following errors in the console (Firefox Mac 106.0.5) (* *):
      *
      GET https://apps.it-pummer.de/crm/api/v1/Settings [HTTP/2 404 Not Found 65ms]
      GET https://apps.it-pummer.de/crm/api/v1/I18n?default=true [HTTP/2 404 Not Found 65ms]
      *

      As said above i have already followed your procedure (https://docs.espocrm.com/administrat...configuration/) regarding failing installations in Apache environment and after step 3 ("Add RewriteBase path (last resort, in most cases not required)") I only get a 401 error on API request... :-/

      Comment


      • #4
        Hi there,
        unfortunately I did not manage to get said instance into a working condition. After the update to version 7 I always got the Routing-Related Errors. (Also i reproduced said Update and fresh-Install as well multiple Times on my Webspace but no luck with V7)

        However i am able to work again now. The Error disapeared after migrating to another Shared-Hosting-Provider. Before i was using Shared Hosting at Strato in Germany. Now that i migrated data & db and changed the configs all works fine.

        But maybe there is a takeaway - idk. (For me it's to not use Strato anymore ^^)


        Thanks for your Assistance though!
        All the best!
        Xaver Pummer​

        Comment

        Working...
        X