0

Hi I have an Apache web server in ubuntu 18.04.02 when I try to access my site (VTiger CRM 7.1) using my public IP it always redirects to my private IP

Current conf file

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/crm/
     ServerName example.com 
     ServerAlias www.example.com

     <Directory /var/www/html/crm/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Firewall disabled

2 Answers2

0

Are you sure your CRM is configured to work on the external IP? maybe it is redirecting you upon your first visit.

benyafai
  • 144
  • 6
0

Use the following $site_URL in config.inc.php and replace that with current value

$site_URL = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on' ? 'https': 'http')."://".$_SERVER['HTTP_HOST'].(dirname($_SERVER['PHP_SELF']) != '/' && dirname($_SERVER['PHP_SELF']) != '\\' ? str_replace('\\','/',dirname($_SERVER['PHP_SELF'])) : '').'/'; 
Hamid
  • 378
  • 3
  • 8