<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-AU;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I use this approach all the time. But mostly because I tunnel to my dev box and therefore must setup DNS to point to localhost<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The trouble is it gets annoying when you have to keep editing the hosts file. Also it can be confusing if you forget to change the host file or you do change it and it doesn’t work.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>To solve the latter I use dns flusher<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.coders.com.br/dns-flusher">www.coders.com.br/dns-flusher</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This is a must have plugin for firefox if you often switch from dev to prod using the host file hack Vladimir suggests<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Chris<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> vtigercrm-developers-bounces@lists.vtigercrm.com [mailto:vtigercrm-developers-bounces@lists.vtigercrm.com] <b>On Behalf Of </b>Vladimir Karažija<br><b>Sent:</b> Thursday, 25 June 2015 8:03 PM<br><b>To:</b> vtigercrm-developers@lists.vtigercrm.com<br><b>Subject:</b> Re: [Vtigercrm-developers] use vtiger in lan and external access<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>maybe different approach to this could be to use FQDN URL for vtiger.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Create for example <a href="http://vtiger.yourdomain.com">vtiger.yourdomain.com</a> and publish this URL on DNS.<o:p></o:p></p></div><div><p class=MsoNormal>Enter this URL in config.inc.php <o:p></o:p></p></div><div><p class=MsoNormal>Configure your local DNS to point to your vtiger on local IP.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If you do not have local DNS server you can add this in host file C:\Windows\System32\drivers\etc<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal># Copyright (c) 1993-2009 Microsoft Corp.<o:p></o:p></p></div><div><p class=MsoNormal>#<o:p></o:p></p></div><div><p class=MsoNormal># This is a sample HOSTS file used by Microsoft TCP/IP for Windows.<o:p></o:p></p></div><div><p class=MsoNormal>#<o:p></o:p></p></div><div><p class=MsoNormal># This file contains the mappings of IP addresses to host names. Each<o:p></o:p></p></div><div><p class=MsoNormal># entry should be kept on an individual line. The IP address should<o:p></o:p></p></div><div><p class=MsoNormal># be placed in the first column followed by the corresponding host name.<o:p></o:p></p></div><div><p class=MsoNormal># The IP address and the host name should be separated by at least one<o:p></o:p></p></div><div><p class=MsoNormal># space.<o:p></o:p></p></div><div><p class=MsoNormal>#<o:p></o:p></p></div><div><p class=MsoNormal># Additionally, comments (such as these) may be inserted on individual<o:p></o:p></p></div><div><p class=MsoNormal># lines or following the machine name denoted by a '#' symbol.<o:p></o:p></p></div><div><p class=MsoNormal>#<o:p></o:p></p></div><div><p class=MsoNormal># For example:<o:p></o:p></p></div><div><p class=MsoNormal>#<o:p></o:p></p></div><div><p class=MsoNormal>#      102.54.94.97     <a href="http://rhino.acme.com">rhino.acme.com</a>          # source server<o:p></o:p></p></div><div><p class=MsoNormal>#       38.25.63.10     <a href="http://x.acme.com">x.acme.com</a>              # x client host<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal># localhost name resolution is handled within DNS itself.<o:p></o:p></p></div><div><p class=MsoNormal>#          127.0.0.1       localhost<o:p></o:p></p></div><div><p class=MsoNormal>#          ::1             localhost<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><div><p class=MsoNormal>192.168.1.123        <a href="http://vtiger.yourdomain.com">vtiger.yourdomain.com</a>  <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><div><div><div><div><div><p class=MsoNormal>Vladimir Karažija<o:p></o:p></p></div><div><p class=MsoNormal>Kosa crta d.o.o.<o:p></o:p></p></div><div><p class=MsoNormal>Jagnedje 1<o:p></o:p></p></div><div><p class=MsoNormal>10090 Zagreb<o:p></o:p></p></div><div><p class=MsoNormal>OIB: 57724075047<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>t. +385 1 777 33 85<o:p></o:p></p></div><div><p class=MsoNormal>m. +385 91 122 0511<o:p></o:p></p></div><div><p class=MsoNormal><a href="http://www.kosacrta.hr" target="_blank">www.kosacrta.hr</a><o:p></o:p></p></div></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Thu, Jun 25, 2015 at 2:54 AM, Hamono, Chris (DPC) <<a href="mailto:Chris.Hamono@sa.gov.au" target="_blank">Chris.Hamono@sa.gov.au</a>> wrote:<o:p></o:p></p><p class=MsoNormal>I should have said this is done in config.inc.php<br><br>Chris<br><br>-----Original Message-----<br>From: <a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com">vtigercrm-developers-bounces@lists.vtigercrm.com</a> [mailto:<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com">vtigercrm-developers-bounces@lists.vtigercrm.com</a>] On Behalf Of Hamono, Chris (DPC)<br>Sent: Thursday, 25 June 2015 9:27 AM<br>To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com">vtigercrm-developers@lists.vtigercrm.com</a><br>Subject: Re: [Vtigercrm-developers] use vtiger in lan and extarnal access<br><br>This is what I do...<br><br>if (empty($_SERVER['HTTP_HOST'])) {<br>    $site_URL = '<a href="http://my.domain.name/" target="_blank">http://my.domain.name/</a>';<br>}<br>else {<br>    $site_URL = 'http://' . $_SERVER['HTTP_HOST'] . '/';<br>}<br><br><br>The "if" statement is a quick way to determine if the script is called via the webbrowser you need this for some crons to work.<br><br>No need to edit the http referrer script<br><br>Chris<br><br>-----Original Message-----<br>From: <a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com">vtigercrm-developers-bounces@lists.vtigercrm.com</a> [mailto:<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com">vtigercrm-developers-bounces@lists.vtigercrm.com</a>] On Behalf Of Alan Bell<br>Sent: Wednesday, 24 June 2015 11:14 PM<br>To: <a href="mailto:vtigercrm-developers@lists.vtigercrm.com">vtigercrm-developers@lists.vtigercrm.com</a><br>Subject: Re: [Vtigercrm-developers] use vtiger in lan and extarnal access<br><br>well the line might end up something like<br><br>if ((stripos($_SERVER['HTTP_REFERER'], $site_URL) !== 0 ) && stripos($_SERVER['HTTP_REFERER'], "<a href="http://192.168" target="_blank">http://192.168</a>.") !== 0 && stripos($_SERVER['HTTP_REFERER'], "<a href="http://localhost" target="_blank">http://localhost</a>") !== 0 && stripos($_SERVER['HTTP_REFERER'], "<a href="http://10" target="_blank">http://10</a>.") !== 0 &&<br>($this->get('module') != 'Install')) {<br><br>which would let you access it via the site URL, or an internal IP address starting 192.168.*.* or 10.*.*.* or locally. Your exact requirements might be different.<br><br>Alan.<br><br>On 24/06/15 14:12, marlos22 wrote:<br>> so i have to replace this (stripos($_SERVER['HTTP_REFERER'],<br>> $site_URL) !==<br>> 0) whit my two URL (lan and external access) ????<br>><br>><br>><br>><br>><br>> --<br>> View this message in context:<br>> <a href="http://vtiger-crm.2324883.n4.nabble.com/use-vtiger-in-lan-and-extarnal" target="_blank">http://vtiger-crm.2324883.n4.nabble.com/use-vtiger-in-lan-and-extarnal</a><br>> -access-tp16676p16680.html Sent from the vtigercrm-developers mailing<br>> list archive at Nabble.com.<br>> _______________________________________________<br>> <a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br><br>_______________________________________________<br><a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br><br>_______________________________________________<br><a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br><br>_______________________________________________<br><a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>