[Vtigercrm-developers] use vtiger in lan and external access

Vladimir Karažija vladimir at kosacrta.hr
Thu Jun 25 10:33:07 GMT 2015


Hi,

maybe different approach to this could be to use FQDN URL for vtiger.

Create for example vtiger.yourdomain.com and publish this URL on DNS.
Enter this URL in config.inc.php
Configure your local DNS to point to your vtiger on local IP.

If you do not have local DNS server you can add this in host file
C:\Windows\System32\drivers\etc

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1       localhost
# ::1             localhost

192.168.1.123        vtiger.yourdomain.com



Vladimir Karažija
Kosa crta d.o.o.
Jagnedje 1
10090 Zagreb
OIB: 57724075047

t. +385 1 777 33 85
m. +385 91 122 0511
www.kosacrta.hr

On Thu, Jun 25, 2015 at 2:54 AM, Hamono, Chris (DPC) <Chris.Hamono at sa.gov.au
> wrote:

> I should have said this is done in config.inc.php
>
> Chris
>
> -----Original Message-----
> From: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:
> vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of Hamono,
> Chris (DPC)
> Sent: Thursday, 25 June 2015 9:27 AM
> To: vtigercrm-developers at lists.vtigercrm.com
> Subject: Re: [Vtigercrm-developers] use vtiger in lan and extarnal access
>
> This is what I do...
>
> if (empty($_SERVER['HTTP_HOST'])) {
>     $site_URL = 'http://my.domain.name/';
> }
> else {
>     $site_URL = 'http://' . $_SERVER['HTTP_HOST'] . '/';
> }
>
>
> 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.
>
> No need to edit the http referrer script
>
> Chris
>
> -----Original Message-----
> From: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:
> vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of Alan Bell
> Sent: Wednesday, 24 June 2015 11:14 PM
> To: vtigercrm-developers at lists.vtigercrm.com
> Subject: Re: [Vtigercrm-developers] use vtiger in lan and extarnal access
>
> well the line might end up something like
>
> if ((stripos($_SERVER['HTTP_REFERER'], $site_URL) !== 0 ) &&
> stripos($_SERVER['HTTP_REFERER'], "http://192.168.") !== 0 &&
> stripos($_SERVER['HTTP_REFERER'], "http://localhost") !== 0 &&
> stripos($_SERVER['HTTP_REFERER'], "http://10.") !== 0 &&
> ($this->get('module') != 'Install')) {
>
> 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.
>
> Alan.
>
> On 24/06/15 14:12, marlos22 wrote:
> > so i have to replace this (stripos($_SERVER['HTTP_REFERER'],
> > $site_URL) !==
> > 0) whit my two URL (lan and external access) ????
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> > http://vtiger-crm.2324883.n4.nabble.com/use-vtiger-in-lan-and-extarnal
> > -access-tp16676p16680.html Sent from the vtigercrm-developers mailing
> > list archive at Nabble.com.
> > _______________________________________________
> > http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150625/954e80b1/attachment.html>


More information about the vtigercrm-developers mailing list