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 installed Ubuntu Server 10.04 via VirtualBox, yes, the I use virtual machine, cuz I am learning ubuntu. I installed apache webserver by this command:

sude apt-get install apache2

Everything looks okay, no error. Now, how do I test if the apache server is working? Normally in windows OS, after install apache, I go to web browser, point to 127.0.0.1, and the webpage will display "it works". How do I test my ubuntu server web apache?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

If you want to test your Apache setup from the host machine, you will need to configure your networking in VirtualBox. There is a great tutorial on that here. Then you would point the browser in your host machine to whatever IP address is assigned to the guest.

share|improve this answer

According to the VirtualBox documentation, you have up to 6 networking modes to choose from:

  1. Not attached - No connection in Guest OS
  2. Network Address Translation (NAT) - Default selection mode, allowing guest connection to access internet
  3. Bridged networking - Allow your Guest OS to connect to the network just like another device in the network. (What I normally use)
  4. Internal networking - Not clear.
  5. Host-only networking - Allow connection between host and guests only.
  6. Generic networking - Not clear.

So if you want to test your Ubuntu Server 10.04 in your VirtualBox, you can choose either Bridged Networking or Host-only Networking.

If you are using the Bridged Networking which I have tested, you will have to find out your Guest OS IP address. In desktop mode, it is as simple as clicking (or right-click) the Network Manager -> Connection Information.

Connection Information

share|improve this answer

Either install a text mode browser like w3m or lynx on your server and use that to connect to localhost, or connect from the outside world to your VirtualBox

share|improve this answer
    
Hi, your second solution: "connect from the outside world to your VirtualBox", how to achieve that? –  ubuntuka Aug 3 '11 at 18:45
    
that depends on your network connection... but for quick test you can install miredo on your server and on your client ( it will give both of them ipv6 adress, so you dont have to setup port forwarding ), then run ifconfig | grep "Scope:Global" on your server to see ipv6 adress... and just copy it to your clients webbrowser. In chromium it will look like http://[2001:15c0:****:***::2] –  Denwerko Aug 3 '11 at 18:53
    
@ubuntuka The solution described in DLH's answer should get you a nretwork connection between host and guest. Just use guest's IP address. –  Florian Diesch Aug 3 '11 at 19:14
    
@all: thanks guys –  ubuntuka Aug 4 '11 at 3:02

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.