+ Post New Thread
Results 1 to 11 of 11
Virtual Learning Platforms Thread, Changing Port Number in Technical; Hi Another question for you. I am trying to setup my moodle so that it is accessible over the internet. ...
  1. #1

    Join Date
    Sep 2009
    Location
    Skegness
    Posts
    27
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Changing Port Number

    Hi

    Another question for you.

    I am trying to setup my moodle so that it is accessible over the internet. I have configured my firewalls up and am ready to go. The only problem is that I have another app that is respoding to web requests on port 80. I have tried to change the moodle port number but seem to be getting nowhere.

    Any ideas?

    Thanks
    Michelle

  2. #2


    Join Date
    Oct 2006
    Posts
    3,413
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    149
    What firewall are you running? ISA can read the http header of a request and act appropriatly.

  3. #3

    Join Date
    Sep 2009
    Location
    Skegness
    Posts
    27
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Sorry, I forgot to put that. I have a Cisco firewall which forwards traffic to Smoothwall. It is all done on port forwards, but I already have another app on port 80, hence why it is getting confused.

  4. #4


    Join Date
    Oct 2006
    Posts
    3,413
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    149
    Id assume smoothwakk will be able to forward based on http header; basically it opens up the request packet and reads the url to determine where to forward. ie vle.domain.com may be forwarded to 192.168.1.100 while website.domain.com will go to 192.168.1.200 etc
    Its layer 7 filtering your looking for so if your Cisco firewall is L7 it can do it also.
    Last edited by j17sparky; 1st June 2010 at 11:22 AM.

  5. #5

    Join Date
    Sep 2009
    Location
    Skegness
    Posts
    27
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    All headers get pointed to the cisco box which then forwards all on to smoothwall. I do not see where I can specify which header goes where, but can specify where I can redirect the port to. So, if something comes in on port 80, it goes through to my owa server, if comes in on 591 it goes to moodle. Now, where do I change port 80 to 591 within moodle?

  6. #6


    Join Date
    Oct 2006
    Posts
    3,413
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    149
    Quote Originally Posted by Michelle View Post
    All headers get pointed to the cisco box which then forwards all on to smoothwall. I do not see where I can specify which header goes where, but can specify where I can redirect the port to. So, if something comes in on port 80, it goes through to my owa server, if comes in on 591 it goes to moodle. Now, where do I change port 80 to 591 within moodle?
    Which os? *nix? Apache? you need to make apache listen by changing /etc/apache/ports and then you need to tell the site to respond on that port in /etc/apache/sites-availible/default#

    You can tell smoothwall to change the port number so that although it comes in on 591 it will be passed to the moodle box on port 80.

  7. #7

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    What are you using for the webserver software? You will need to change that to listen on the right port.

    If you are using IIS:

    1. Open Internet Service Manager or Internet Information Services (IIS) Manager.
    2. If necessary, expand the Web server that you want, and then expand Web Sites.
    3. Right-click the Web site that you want to change.
    4. Click Properties.
    5. Click the Web Site tab.
    6. Change the TCP Port Number in the TCP Port edit box (or click Advanced for multiple Port settings).
    7. Click OK to save the changes.

    If you are using Apache:

    Open httpd.conf file in your text editor.
    Find this line:
    Listen 80

    change it to:
    Listen 85


    You will also need to change the URL in your config.php file inside moodle. Change the URL in moodle to something this. http://www.mymoodlesite-exampleurl.com:591

    it goes through to my owa server
    Personally for OWA i would run that on 443 - https. Even if you use a self assigned certificate. That way it will be encrypted.
    Last edited by FN-GM; 1st June 2010 at 12:44 PM. Reason: improvements

  8. #8

    Join Date
    Sep 2009
    Location
    Skegness
    Posts
    27
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Ok, I have changed OWA to SSL and 443 which seems to be running nicely. Now I am trying to access my moodle from outside of school and although I can get through to the login page, all my linkls are pointing to the internet IP address. Sorry, but I really dont understand the masquerading doc that moodle provide and would really like to get a solution in lay mans terms. Any suggestions?

  9. #9

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    can you show us some screenshots?

    Is the all the links or just some.

    go into your config.php file inside you moodle install and see what the URL is in there. If it is the internal IP change it to the URL.

  10. #10

    Join Date
    Sep 2009
    Location
    Skegness
    Posts
    27
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    It is all links on the page. If I alter the static IP address it will give me the text off the page. (screenshot below)

    Config:

    <?php /// Moodle Configuration File

    unset($CFG);

    $CFG->dbtype = 'mysql';
    $CFG->dbhost = 'localhost';
    $CFG->dbname = 'moodle';
    $CFG->dbuser = 'root';
    $CFG->dbpass = 'very secret password!!;
    $CFG->dbpersist = false;
    $CFG->prefix = 'mdl_';

    $CFG->wwwroot = 'http://moodle.skegnessgrammar.lincs.sch.uk';
    $CFG->dirroot = 'M:\server';
    $CFG->dataroot = 'M:\moodledata';
    $CFG->admin = 'admin';

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

    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.
    ?>


    Apologies, I have a screenshot, but dont see how to upload it.
    Attached Files Attached Files

  11. #11

    Join Date
    Sep 2009
    Location
    Skegness
    Posts
    27
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Ooh, also, I am attaching a copy of my phpinfo as it seems to be showing all kinds of conflicting information.

    I do apologise, but I really know very very little about moodle and web technology, more of a nuts of bolts person.
    Attached Files Attached Files

SHARE:
+ Post New Thread

Similar Threads

  1. Change iTALC port number
    By brubakes in forum Network and Classroom Management
    Replies: 8
    Last Post: 7th October 2011, 03:03 PM
  2. Replies: 4
    Last Post: 21st May 2010, 12:08 PM
  3. SQL 2005 - port number
    By monsterplastic in forum MIS Systems
    Replies: 2
    Last Post: 8th December 2007, 08:38 PM
  4. Quick Exchange 2003 Port number Query
    By bensewell in forum Windows
    Replies: 3
    Last Post: 17th September 2007, 12:50 PM
  5. Changing port vLANs on an HP ProCurve switch
    By MrDylan in forum Hardware
    Replies: 6
    Last Post: 9th March 2006, 03:13 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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