Jump to content

Recommended Posts

Posted

A while back I set up Moodle on an old desktop for a couple of teachers to use. These teachers fell in love with it straight away, and we are now using Moodle for our entire Music & Key Skills subjects. I decided to get the Moodle setup of an old desktop and stick it on a VM on hardware a little more reliable, I thought it would be better to do this now before another department falls in love with it.

 

So, I went about setting up my VM with Ubuntu 8.04 on it, and installed all the software required for Moodle. Next, I set up SMB shares on the old and new servers, and copied ALL the files/folders in 'www' and 'moodledata' from the old desktop to the new VM. I also exported the db and imported it into the new setup.

 

Finally, I turned the old desktop off and changed the IP of the new VM to that of the old desktop (so it was sitting exactly in his place - so we don't have to change the external route for the IP address.)

 

Anyhow, browsing to internal IP or moodle . domain . com works fine, but browsing to external address/IP throws a connection refused error. What is the matter with this? It's a problem somewhere on the new box as I turned it off, put the old one back on and it worked fine. I just don't know where?

  • Thanks 1
Posted
is apache listening on the external connection?

(netstat -nl)

 

Here's the output of the old desktop (the one that works externally):

 

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:81              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
udp        0      0 10.33.225.248:137       0.0.0.0:*
udp        0      0 0.0.0.0:137             0.0.0.0:*
udp        0      0 10.33.225.248:138       0.0.0.0:*
udp        0      0 0.0.0.0:138             0.0.0.0:*
udp        0      0 0.0.0.0:10000           0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     11104    /var/run/mysqld/mysql

 

And here's the output of the new one:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
udp        0      0 10.33.225.248:137       0.0.0.0:*
udp        0      0 0.0.0.0:137             0.0.0.0:*
udp        0      0 10.33.225.248:138       0.0.0.0:*
udp        0      0 0.0.0.0:138             0.0.0.0:*
udp        0      0 0.0.0.0:10000           0.0.0.0:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     10758    /var/run/mysqld/mysql                                                                             d.sock

 

is the firewall blocking http on the external?

 

Our firewall routes the server that works fine, so I doubt it's a problem with that...

Posted

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN

 

that looks ok.

I assume it has an external network card, that is up and configured with an external IP (ifconfig)

Posted

did you copy the original apache config file over?

I think you should. I noticed this

tcp        0      0 0.0.0.0:81              0.0.0.0:*               LISTEN 

in your old config, perhaps the firewall is still forwarding to port 81

  • Thanks 1
Posted

Duh, it's all coming back to me now. We needed to set it up so external address routed to port 81. Changing the config now (and making a BIG note of it!).

 

Thanks! :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...