Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

some weeks ago I've prepared a virtual server in Virtualbox. It has the following specifications:

OS: Ubuntu Server 12.04 LTS
Arch: 32 bits
Virtual Hard Disk Size: 360 GB
Network adpaters:

  • eth0: NAT
  • eth1: Bridge adapter

I also installed the following modules: apache2, php5 and ssh

Well, the situation is the following one:

I want to access the server via url (http://ip_address:port). When I enter without doing any change to ports.conf (located in /etc/apache2) as http://server_public_ip or http://server_public_ip:80, in the web browser appears the "It works!" test page. But if I change the port in ports.conf (i.e to 8000, 8072 or 8080), and after that change I reload the apache server, when I'm going to enter to the server (http://server_public_ip:8000, http://server_public_ip:8072 or http://server_public_ip:8080, depending of the given port), it shows me the 404 error page.

My question is: How can I unlock those ports (or any other one) to access to the server via URL?

Note I've tried with iptables and ufw, but they didn't help to solve the problem.

share|improve this question

You must change default port in virtual hosts file

<VirtualHost *:80>

You need to change that to <VirtualHost *:8080> or <VirtualHost *:8000> or <VirtualHost *:8072> or <VirtualHost *:*>. Restart apache.

share|improve this answer

Your Answer


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.