Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm new to the server side of Ubuntu. I'm trying to use Ubuntu as a host for my online coding platform and coaching website.

I have set up a Ubuntu server on a virtual machine and have installed some software required for my Virtual Programming Lab. I have followed the instruction outlined here in order to produce the server.

I am trying to access ports on the virtual machine from my virtual programming lab install. My question is essentially, how from my Server install on a VirtualBox on Mac OSX do I find the url and port such as

http:// servername :PORT

If I can find this, I am able to point the website with the virtual programming lab to the server so that processing can be handled. I am using a standard WiFi home connection.

share|improve this question

1 Answer 1

There could be several things going on here:

1) Check the VM is configured to use bridging for the network. By default, Virtualbox sets networking to NAT which will give you a 10.x.x.x IP on the guest rather than a suitable IP for your network;

2) Make sure the hostname for the guest can be resolved by the DNS on the network. You could just connect via the IP instead of the hostname in the meantime;

3) Make sure the Apache service is running on the host. sudo service apache2 start

4) If you have configured a firewall on the guest, make sure it's allowing traffic through port 80.

5) Do some simple troubleshooting. e.g. ping your lab machine from the VM guest, ping the VM guest from the VM host, ping the VM guest from your lab machine, etc...

Apologies if some, or all, of this is teaching you to suck eggs but detail was lacking in the post. Plus, I still continue to be caught out by one or more of the above on occasion.

Rob

UPDATE:

Apologies, I have a hectic work schedule so I don't often get a chance to visit here.

The message you see about Apache not being able to resolve the hostname is due to the hostname not being in either /etc/hosts or defined in your DNS. Do this, and that message will go away.

If you cannot get to your webserver with http://yourservername:80 then make sure port 80 has been opened on the firewall.

You can use nmap to check that the port is open

If necessary, install nmap sudo apt-get install nmap

nmap yourservername

This should give you a list of currently open ports. For example:

Starting Nmap 5.21 ( http://nmap.org ) at 2014-03-12 17:23 GMT Nmap scan report for backup (192.168.24.12) Host is up (0.00021s latency). Not shown: 998 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http

Do these things first before worrying about the other message.

Regards

Rob

share|improve this answer
    
Hi Rob, I apologize for the lack of information. So I have the website with my Lab installed on a moodle install on a web hosting provider. I have a bridged connection on my personal ubuntu server. When typing the apache2 command I get an error > Could not reliably determine the servers fully qualified domain name I understand that I probably need to open port 80 for the website to access the server. Also on the host machine when I type the given inet addr from the ubuntu install into the web browser I get a HTTP Method not implemented error. –  Timothy Ford Mar 4 at 18:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.