+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 39
Virtual Learning Platforms Thread, Moodle two IP Addresses (LAN & Internet) in Technical; Have you got HTTPS enabled?...
  1. #16

    Join Date
    Mar 2010
    Posts
    203
    Thank Post
    34
    Thanked 31 Times in 30 Posts
    Rep Power
    14
    Have you got HTTPS enabled?

  2. #17

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318
    OK. You have it set correctly in the config file, but CSS/images still aren't loading. It's because I can't resolve your hostname via DNS.

    You can check for yourself here: http://www.kloth.net/services/nslookup.php
    Last edited by webman; 11th January 2011 at 11:30 AM.

  3. #18

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,467
    Thank Post
    750
    Thanked 1,210 Times in 852 Posts
    Blog Entries
    45
    Rep Power
    533
    Quote Originally Posted by karan_jhr View Post
    Did exactly as webman said
    Local address 10.14.*.* on LAN and Config File
    Working good
    Via Internet Loads but without CSS
    Looked at the site at the address you messaged - I can load it but no CSS - it looks like it is trying to load the stylesheets from http://apps.{URL}.sa (http://apps.{URL}.sa/moodle/theme/standard/styles.php to be exact).

    In the config file, don't use an IP. Use the actual web address that then resolves to the IP.
    Last edited by sonofsanta; 11th January 2011 at 12:26 PM. Reason: URL redacted by request

  4. #19

    Join Date
    Jan 2011
    Posts
    59
    Thank Post
    29
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I am not using an ip in the config file anymore
    its actual host name
    is there anyway to bind he CSS to a specific address to load?
    Through actual name it loads very well on LAN but not on Internet??

  5. #20

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318
    karan_jhr: The best and preferred way of doing things is via the hostname. Are all your users really accessing it externally just via the IP address?

    Through actual name it loads very well on LAN but not on Internet??
    This is because there is no DNS entry for apps.{URL} pointing to the 212.*.*.* address on the internet DNS system.

    If you can't get that working, you can change it like this:

    Code:
    $CFG->wwwroot = 'http://' . $_SERVER["HTTP_HOST"] . '/moodle';
    Last edited by robk; 18th January 2011 at 03:04 PM. Reason: redacted live url at request of owner

  6. 2 Thanks to webman:

    karan_jhr (11th January 2011), themightymrp (21st January 2014)

  7. #21

    Join Date
    Jan 2011
    Posts
    59
    Thank Post
    29
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    my latest config file is

    [code]<?php /// Moodle Configuration File

    unset($CFG);

    $CFG->dbtype = 'mysql';
    $CFG->dbhost = 'localhost';
    $CFG->dbname = 'moodle';
    $CFG->dbuser = 'root';
    $CFG->dbpass = '**********';
    $CFG->dbpersist = false;
    $CFG->prefix = 'mdl_';
    //$CFG->wwwroot = 'http://212.xx.x.xx/moodle';
    $CFG->wwwroot = 'http://apps.{URL}/moodle';
    $CFG->dirroot = 'C:/Inetpub/wwwroot/moodle';
    $CFG->dataroot = 'C:/Inetpub/moodledata';
    $CFG->admin = 'admin';

    $CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode

    $CFG->passwordsaltmain = '>+@ #0CMXq?>_Pz@e^+].H],';

    require_once("$CFG->dirroot/lib/setup.php");
    // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
    // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
    ?>[\code]
    Last edited by robk; 19th January 2011 at 11:45 AM. Reason: redacted live url at request of owner

  8. #22

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,467
    Thank Post
    750
    Thanked 1,210 Times in 852 Posts
    Blog Entries
    45
    Rep Power
    533
    As webman says - the URl you are using for your CSS files doesn't resolve on the internet, there is no public DNS entry for the domain you're using.

    Not entirely sure where you edit the CSS settings themselves though - I must confess that I went for a managed solution to our Moodle because otherwise I would have ended up spending all my time running the site instead of all my other duties, so I don't have the specific Moodle knowledge to be able to guide you to the relevant setting.

    If anyone else does know - there must be some way of uploading the stylesheet onto the VLE server and then using a relative URL to it. Perhaps the absolute address just needs tweaking so that it points to the VLE URL.

    So I know what your error is, just not where to fix it - someone else will have to take over from me here I'm afraid.

  9. #23

    Join Date
    Jan 2011
    Posts
    59
    Thank Post
    29
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    i really appreciate your help sonofsanta
    thanks for your time and interest
    Really appreciated

  10. #24

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,467
    Thank Post
    750
    Thanked 1,210 Times in 852 Posts
    Blog Entries
    45
    Rep Power
    533
    What address do people use to get to the moodle from outside? Do they just have to type in the IP address or do you have an actual URL?

    The address you use in the wwwroot isn't on the internet DNS servers. You might have to ask your ISP to create the DNS A record for that address?

  11. Thanks to sonofsanta from:

    karan_jhr (11th January 2011)

  12. #25

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,467
    Thank Post
    750
    Thanked 1,210 Times in 852 Posts
    Blog Entries
    45
    Rep Power
    533
    Quote Originally Posted by karan_jhr View Post
    i really appreciate your help sonofsanta
    thanks for your time and interest
    Really appreciated
    That's alright - we're all in it together, right?

    Any time you want to show someone some appreciation just click the > Thank Post < link at the bottom of their post, so we can all tell who's useful round here!

  13. Thanks to sonofsanta from:

    karan_jhr (11th January 2011)

  14. #26

    Join Date
    Jan 2011
    Posts
    59
    Thank Post
    29
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    outside users use it like 212.xx.x.xx/moodle to access it
    Last edited by robk; 18th January 2011 at 03:04 PM. Reason: redacted live url at request of owner

  15. #27

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,467
    Thank Post
    750
    Thanked 1,210 Times in 852 Posts
    Blog Entries
    45
    Rep Power
    533
    Quote Originally Posted by karan_jhr View Post
    outside users use it like 212.xx.x.xx/moodle to access it
    Going to that address then redirects me to the URL http://apps.{URL}/moodle/login/index.php which doesn't work. If I replace the domain with the IP, though, it works. It looks like you need to get a DNS A record created that points the URL http://apps.{URL} to the IP 212.xx.x.xx. That should then resolve the CSS error as well.

    PM me again if you want me to edit out the URL's - just posting them in full here so you have all the details you need to get the fix done.
    Last edited by robk; 18th January 2011 at 03:05 PM. Reason: redacted live url at request of owner

  16. #28

    Join Date
    Jan 2011
    Posts
    59
    Thank Post
    29
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    if i change the wwwroot address in the config file to 212.xx.x.xx it works perfectly fine on internet even the CSS Loads.
    But then local users on LAN are redirected to the Internet address 212.xx.x.xx as well and they experience a slow speed. We are back to the same point from where i started that i want LAN users to use local 1P address for fast speed and internet users to use 212.xx.x.xx reaching the same server.
    Last edited by robk; 18th January 2011 at 03:06 PM. Reason: redacted live url at request of owner

  17. #29

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318
    As I said before, please try it with $_SERVER['HTTP_HOST']. Don't replace that with whatever host or IP you want - just leave that in. It is a PHP variable which should work whether you access it via internal IP, external IP, or hostname.

    Code:
    <?php /// Moodle Configuration File 
    
    unset($CFG);
    
    $CFG->dbtype = 'mysql';
    $CFG->dbhost = 'localhost';
    $CFG->dbname = 'moodle';
    $CFG->dbuser = 'root';
    $CFG->dbpass = '**********';
    $CFG->dbpersist = false;
    $CFG->prefix = 'mdl_';
    //$CFG->wwwroot = 'http://212.26.x.xx/moodle';
    $CFG->wwwroot = 'http://' . $_SERVER['HTTP_HOST'] . '/moodle';
    $CFG->dirroot = 'C:/Inetpub/wwwroot/moodle';
    $CFG->dataroot = 'C:/Inetpub/moodledata';
    $CFG->admin = 'admin';
    
    $CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode
    
    $CFG->passwordsaltmain = '>+@ #0CMXq?>_Pz@e^+].H],';
    
    require_once("$CFG->dirroot/lib/setup.php");
    // MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
    // RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
    ?>
    Last edited by robk; 18th January 2011 at 03:06 PM. Reason: redacted live url at request of owner

  18. #30

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,467
    Thank Post
    750
    Thanked 1,210 Times in 852 Posts
    Blog Entries
    45
    Rep Power
    533
    What webman says.

    The proper fix is that your web address is not registered with your ISP, and you would need to ask them to create the A record for the URL that points to the public IP. This will probably involve a charge and will take at least 24 hours to propogate.

    Or, do what webman suggests, which will take ten seconds and work. So do that now, and then consider doing the above.

    Unless you do the DNS record through your ISP, though, your users will have to use the IP to access the Moodle from home.

SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Stumped with this one...internet connection problem over LAN
    By Little-Miss in forum Internet Related/Filtering/Firewall
    Replies: 11
    Last Post: 19th May 2010, 04:07 PM
  2. Remote Access to LAN PCs over Internet
    By Asif in forum Network and Classroom Management
    Replies: 15
    Last Post: 5th September 2009, 08:56 PM
  3. Running out of (private) addresses on College LAN
    By Bruce123 in forum Wireless Networks
    Replies: 20
    Last Post: 26th May 2009, 10:33 AM
  4. !!HELP!! Static IP & LAN Issue
    By Kamran7860 in forum Windows 7
    Replies: 8
    Last Post: 11th May 2009, 08:24 PM
  5. Blocked addresses to internet?
    By jmair in forum Windows
    Replies: 4
    Last Post: 21st August 2008, 08:22 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •