karan_jhr Posted January 11, 2011 Author Posted January 11, 2011 (edited) outside users use it like 212.xx.x.xx/moodle to access it Edited January 18, 2011 by robk redacted live url at request of owner
sonofsanta Posted January 11, 2011 Posted January 11, 2011 (edited) 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. Edited January 18, 2011 by robk redacted live url at request of owner
karan_jhr Posted January 11, 2011 Author Posted January 11, 2011 (edited) 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. Edited January 18, 2011 by robk redacted live url at request of owner
webman Posted January 11, 2011 Posted January 11, 2011 (edited) 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. 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. ?> Edited January 18, 2011 by robk redacted live url at request of owner
sonofsanta Posted January 11, 2011 Posted January 11, 2011 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.
karan_jhr Posted January 12, 2011 Author Posted January 12, 2011 (edited) DNS entry is there now Created DNS A record that points the URL http://apps.{URL} to the IP 212.xx.x.xx Sub directory /moodle has been removed now its running directly at the address but still locally On internet it gives a blank page Edited January 18, 2011 by robk redacted live url at request of owner
teejay Posted January 12, 2011 Posted January 12, 2011 (edited) DNS entry is there now Created DNS A record that points the URL http://apps.{URL} to the IP 212.xx.x.xx Sub directory /moodle has been removed now its running directly at the address but still locally On internet it gives a blank page http://apps.{}URL/moodle works for me, http://apps.{}URL takes me to an 'Under Construction' page. Once you are happy this works, you really want to get the login page on https as at the moment the users username and password are being sent in plain text across the internet when they login. Edited January 18, 2011 by robk redacted live url at request of owner
sonofsanta Posted January 12, 2011 Posted January 12, 2011 (edited) DNS entry is there now Created DNS A record that points the URL http://address to the IP {numbers} Sub directory /moodle has been removed now its running directly at the address but still locally On internet it gives a blank page Works for me. Going to http://address then redirects me to http://address/login/index.php which loads to a login page with CSS styles applied. Edited January 12, 2011 by sonofsanta Redacting specific data as per request in #34 1
karan_jhr Posted January 12, 2011 Author Posted January 12, 2011 (edited) thanks everyone 1) it was something to do with / or \ in the configuration file 2) DNS A record that points the URL http://10.14.*.* to the IP 212.*.*.* It still didnt load the CSS but then 3) The magic line $CFG->wwwroot = 'http://' . $_SERVER["HTTP_HOST"] . '/moodle'; BY Webman Solved it all Now i am able to browse on LAN via 10.14.*.* and on Internet via 212.*.*.* really thankful to everyone who helped me kindly edit your posts to remove the actual address of my server please really appreciated this forum rocks and i would like to contribute to the forum myself in other threads Edited January 12, 2011 by karan_jhr
sonofsanta Posted January 12, 2011 Posted January 12, 2011 kindly edit your posts to remove the actual address of my server please Unfortunately the timer has expired on my older posts so I can't edit them - is there a kindly moderator or admin passing who can do the magic for us please? really appreciated this forum rocks and i would like to contribute to the forum myself in other threads Please do - it's only so wonderful because people take genuine time to try and fix each other's problems, the more people chipping in there, the better it will get! 1
karan_jhr Posted January 12, 2011 Author Posted January 12, 2011 sure i will do whatever i can i owe you guys and i do have very solid experience in Labs Management etc thanks one again everyone i want to request the moderator to this thread to Kindly remove all the links to my server please cheers
robk Posted January 18, 2011 Posted January 18, 2011 sure i will do whatever i can i owe you guys and i do have very solid experience in Labs Management etc thanks one again everyone i want to request the moderator to this thread to Kindly remove all the links to my server please cheers Done them all I think. 1
ipsool Posted January 15, 2013 Posted January 15, 2013 hello, i installed moodle on server 2008 r2, IIS7, PHP, MYSQL, with active directory and DNS. i want to know, how to make this moodle available online, where students can access it from home to view the courses. it is working on lan using domain name (moodle.myschool.edu) and internal ip address (192.168.***.***). and also i don't want to access the moodle via internet while working on lan. need help in this, thank you, ipsool
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now