Thursday, September 29, 2016

Access Vtiger from private and public IP's| throw new exception('illegal request') | {"success":false,"error":{"code":"Illegal request","message":"Illegal request"}}

Facing error type:- {"success":false,"error":{"code":"Illegal request","message":"Illegal request"}}

Solution:-

How to access  vtiger crm with local lan IP and my  Public ip.




  1. Login to router and port forward  public:80 ----- private:80
  2. Login to vtiger via SSH and configure the both ip address in config file

 nano /var/www/vtigercrm/config.inc.php
$site_URL ='http://public ip/vtigercrm/';             
$site_URL ='http://private ip/vtigercrm/';

  1. change the request.php file
 configure the request.php file - // comment the   "$this->validateReferer();" line

original 
        function validateReadAccess() {
         $this->validateReferer();
                // TODO validateIP restriction?
                return true;
        }


changes
nano /var/vtigercrm/includes/http/Request.php

        function validateReadAccess() {
//         $this->validateReferer();
                // TODO validateIP restriction?
                return true;
        }


I you now access it remotely from outside the lan, as well as internally. However, internally, I will still need to use the PUBLIC IP (as if I am outside the LAN)





No comments:

Post a Comment