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.


You must change default port in virtual hosts file

<VirtualHost *:80>
        ServerAdmin webmaster@example.com
        ServerName example.com
        ServerAlias www.example.com

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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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