I cannot access the domain defined on the virtual host in linux ubuntu

:warning: IMPORTANT, please fill the questions

We assume you are using Bitnami to deploy your application.

  • Which version of the application are you using?:

  • Please choose how you got the application: Installer (Windows, Linux, macOS), cloud image (AWS, GCE, Azure, …) or VM (VMDK, VBOX):

  • Have you installed any plugin or modified any configuration file?:

  • Describe here your question/suggestion/issue (expected and actual results):
    I am trying to access the address that I define in the virtualbox of the application without any success, I followed the instructions established in the official documentation step by step without any result.

Delete the following line in the installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf
I commented all the content of this file

Add a new link in the installdir/apache2/conf/bitnami/bitnami-apps-vhosts.conf file:
I added the vhost file of the related application, as follows:

 #Bitnami applications installed in a Virtual Host
Include "/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/conf/httpd-vhosts.conf"


<VirtualHost *:8080>
    ServerName phpmyadmin.example.com
    ServerAlias www.phpmyadmin.example.com
    DocumentRoot "/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/htdocs"
    Include "/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/conf/httpd-app.conf"

 # <VirtualHost *:8443>
 #     ServerName phpmyadmin.example.com
 #     ServerAlias www.phpmyadmin.example.com
 #     DocumentRoot "/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/htdocs"
 #     SSLEngine on
 #     SSLCertificateFile "/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/conf/certs/server.crt"
 #     SSLCertificateKeyFile "/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/conf/certs/server.key"
 #     Include "/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/conf/httpd-app.conf"
  • Steps to reproduce the issue (if relevant):

When trying to access to phpmyadmin.example.com, it says that you cannot access

  • Copy the apache log (if relevant):

I would greatly appreciate your help, I am doing this first with the application that comes by default from phpmyadmin and then try other projects. I don’t know what it may take here

Hi @aponte_14leonardo,

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please download and execute it on the machine where the stack is running by following the steps described in the guide below?

How to Run the Bitnami Support Tool

Please note that you need to paste the code outputted by the tool in your reply.


That is the code, although it was a bit confusing to get it. Thank you very much for answering

Hi @aponte_14leonardo,

I see in the bnsupport bundle that you have commented out the lines related to HTTPS server in the /opt/bitnami/apps/phpmyadmin/httpd-vhosts.conf file. Can you tell us why? Can you uncommented them and restart the Apache web server?

sudo /opt/bitnami/ctlscript.sh restart apache

Apart from that, as you are setting a domain name that is not real (I understand that you did not configure it in any DNS provider), you will need to configure your computer to understand that when asking for phpmyadmin.example.com he must connect with your virtual machine. To do so, you can use the /etc/hosts file of your Linux computer. You will need to first get the IP address of your virtual machine by running the command below in the virtual machine console

sudo ifconfig eth0

You will see an output similar to this

$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 02:42:ac:11:00:07
          inet addr:  Bcast:  Mask:
          RX packets:20849436 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14931703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:40772289847 (40.7 GB)  TX bytes:9109596542 (9.1 GB)

The inet addr: string shows the IP address of the virtual machine. In my case, With that parameter, you need to add a new line at the end of the /etc/hosts file like the one below. Please replace YOUR_VM_IP_ADDRESS with the value you got from running ifconfig

YOUR_VM_IP_ADDRESS phpmyadmin.example.com

After that, if you should see phpMyAdmin if you visit http://phpmyadmin.example.com/phpmyadmin

Hope it helps,

Good morning, I comment on these lines because I do not have the local server configured to have https through ssh and if they are not commented, it gives me an error:
file '/home/angel/lampstack-7.1.17-0/apps/phpmyadmin/ conf / certs / server.crt 'does not exist or is empty
apache config test fails, aborting.
I added the ip of my machine in this section of etc / host, but I still can’t access phpmyadmin

I executed again the tool of support and this is the code:


Hi @aponte_14leonardo,

Can you send us the content of the /etc/hosts file on your machine? Can you send us a screenshot of the error you are getting when accessing the phpMyAdmin domain (phpmyadmin.example.com)? Also, can you send us the output of running the command below on your machine?

sudo ifconfig

Apart from that, can you download, install and run the latest version of the bnsupport tool on your virtual machine so we can get more information about the status of the Bitnami installation?



tool tracking code:

Thank you very much for your attention

Hi @aponte_14leonardo,

Thanks for the screenshots. You are configuring the /etc/hosts entry with your computer IP address instead of the virtual machine IP address. Please run the sudo ifconfig command in the virtual machine console and then update the /etc/hosts entry with that IP address. That’s way, accessing to phpmyadmin.example.com on your computer, it will be pointed to your virtual machine.

EDITED: modified previous post to clarify the steps to configure /etc/hosts

Hope it helps,

I entered the console of the bitnami server that I use, the question is what is the address of the virtual machine attached the address of vboxnet0 to the file etc / hosts but the same screen appears in the browser that is to say it does not connect or does not resolve the address.

Hi @aponte_14leonardo,

You will need to run the ifconfig command in your virtual machine, not in your PC. Apart from that, I recommend you to set the network mode to “Bridged Adapter” under the virtual machine networking preferences as shown in the image below. With that network mode, your virtual machine will be another computer on your LAN, and it will be available from other devices on your network. You will need to power off your virtual machine first to modify this setting


Apart from that, note that, the IP address of the vboxnet0 interface, is the IP address of your computer in the internal network created between your computer and your virtual machine (that’s probably because the network mode is not set as “Bridged Adapter”.

Hope it helps,

Good morning gongomgra, I think the instructions you give me is as if I had installed the application with a virtual machine, I installed it from the Linux distribution:

I installed it and followed the instructions that are here, so when you tell me that I should run the ifconfig on the virtual machine it seems strange because all I could do is run ./use_lampstack to see that configuration, but it is the same as if I ran the command from outside the console is to say in any terminal other than bitnami.
I have virtual box but I am not using it with the lamp bitnami server.
Thanks again for your attention

Hi @aponte_14leonardo,

I’m afraid I have misunderstood your installation setup. I though you were running one of our virtual machines out of this sentence on your first post

I am trying to access the address that I define in the virtualbox of the application without any success

If you are running LAMP on your own computer, then you need to add the next line on your /etc/hosts file for your desired domain name to point to your own computer phpmyadmin.example.com

After that, try to access http://phpmyadmin.example.com from your browser


I get the same error as in the beginning, the related images are shown here:image

Hi @aponte_14leonardo,

Can you check that the Apache service is running on your server?

/home/angel/lampstack-7.1.17-0/ctlscript.sh start

After that, and as you installed your stack with a non-privileged user, you will need to use port 8080 to access the phpMyAdmin service


Hope it helps,

Great, thank you very much. I could finally access.
One more doubt, if I install bitnami lamp under the sudo command, could the interface be accessed without specifying the correct 8080 port?

Hi @aponte_14leonardo,

I’m glad you could access to phpMyAdmin! Yes, if you install the stack with admin privileges using sudo, it will use port 80 (default HTTP port) instead of 8080 and you won’t need to specify the port.

Hope it helps,

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.