Announcement

Collapse
No announcement yet.

Customer Portal Returning 404

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

  • Customer Portal Returning 404

    I hope someone here can assist. We're trying to setup the customer portal on espo. We're running a Plesk Dedicated Server
    with version 5.9.3 installed. We have followed these instructions to a T. https://docs.espocrm.com/administrat...cess-to-portal


    Screenshot of what we get when going to the url: https://prnt.sc/t9ftar

    Can anyone assist as to other possible reasons why we would be getting a 404? If it helps the only thing in the console is

    Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. jquery-2.1.4.min.js:4:18306

    This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. MY DOMAIN

    Also Im getthing these errors in my log every second literally.












  • #2
    Hi there,
    due to your description, I am assuming that you utilize an Apache web server. Please investigate my configs for my local instance. Hope it will give you a few tips.

    Code:
    <VirtualHost *:80>
    
    ServerName asd.com
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/espo
    
        <Directory /var/www/html/espo/>
    
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            allow from all
    
            <ifModule mod_headers.c>
                Header always set Access-Control-Allow-Methods "POST, GET, PUT, PATCH, DELETE"
            </ifModule>
    
            <IfModule mod_rewrite.c>
    
                RewriteEngine On
    
                # Custom portal URL
                RewriteCond %{HTTP_HOST} ^asd.com$
                RewriteRule ^client - [L]
    
                RewriteCond %{HTTP_HOST} ^asd.com$
                RewriteCond %{REQUEST_URI} !^/portal/5a8a9b9328e6a955b/.*$
                RewriteRule ^(.*)$ /portal/5a8a9b9328e6a955b/$1 [L]
    
            </IfModule>
    
        </Directory>
    
    [COLOR=#c0392b]    <Directory /var/www/html/espo/portal>
            Options Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>
    
        <Directory /var/www/html/espo/api/v1/portal-access>
           Options Indexes FollowSymLinks
           AllowOverride All
           Order allow,deny
           allow from all
        </Directory>[/COLOR]
    
    </VirtualHost>
    
    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    Please take a look at those two red <Directory> blocks. You need to have them in your configs as they allow the .htaccess support for Portal.

    Comment


    • #3
      Thanks Maximus!

      We have fixed the portal by adding following NGINX additional directive :
      ==========
      if ($http_host ~ "^portal\.[[MYDOMAIN]]\.com$"){
      set $rule_0 1$rule_0;
      }
      if ($uri ~ "^/api/.*$"){
      set $rule_0 3$rule_0;
      }
      if ($uri ~ "^/client/.*$"){
      set $rule_0 3$rule_0;
      }
      if ($uri !~ "^/portal/[[PORTAL_ID]]/.*$"){
      set $rule_0 2$rule_0;
      }
      if ($rule_0 = "21"){
      rewrite /(.*) /portal/[[PORTAL_ID]]/$1 break;
      }
      ==========

      Comment

      Working...
      X