Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Website internal /external problem

Status
Not open for further replies.

dzon

IS-IT--Management
May 26, 2005
103
GB
Hi,

I am not sure this is the correct location for this thread but here goes. I have recently set up a Moodle site using EasyPHP. It all works great internally. While my luck was in I decided to create a subdomain and point it to my internal moodle server so it can be accessed from home. In the root I created a simple index.html file for test purposes and it works fine from outside the school.

The problem is when (from home) I point to the moodle folder it takes forever and then there are loads of issues. One thing I notice in the status window is that it is trying connect to the server's internal IP.

ok, so within the Moodle config.php file i find $CFG-> ='192.168.0.1'; so I change it to the subdomain address and bingo it works from home but no longer in school. LOL - aahh

Does anybody know how I get around this. Is it possible to somehow detect whether the site is being accessed from an external or internal source?

Thanks in advance

Dzon
 
sounds like you have a dns problem in your local domain. have a look into that.

in the config file i'd recommend changing the local IP to an actual base url (but this does need you dns sorted).
Code:
$CFG->[URL unfurl="true"]wwwroot[/URL]   ='<?=$_SERVER['PHP_SELF']?>'
 
HI,

Thanks for reply. I already spoke to IT Support and they told me it is not possible to view subdomain using the URL from inside the college and I had to use the internal IP.
I'll ask again and mention a possible DNS issue.

Also, could you please explain the above code?

which section would i put the URL in? maybe replace PHP_SELF with URL?

Thanks in advance

Dzon

 
no the $_SERVER['PHP_SELF'] tells php to insert the current page address. my mistake, you should just take the base address of the current page.

i now also see more of what you are trying to do. basically - i don't think you can make it work in the way that you want. instead you need to configure the subdomain to be the internal domain. you will need your it dept's help for this if you are to make it externally accessible too.

alternatively perhaps a vpn solution might work?
 
Hi,

Thanks all, I asked IT Support again to check DNS and they created an internal which now resolves to the server. Everything works a treat now.

Cheers,

Dzon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top