Ubuntu VM Can't get apache2 to work outside the network

temal

New Member
Aug 3, 2024
16
1
3
I am running Proxmox on a Raspberry Pi 5 (unofficially arm64 version). I set up an Ubuntu Server VM on the Proxmox interface, I installed only SSH, apache2 and PHP on the VM and I also enabled firewall and allowed 'Apache Full' and 'OpenSSH'. My */etc/apache2/sites-enabled/colinm_de.conf* config file looks like this:
Screenshot 2024-08-04 000050.png

I also have another file in this directory which looks like this
Screenshot 2024-08-04 000150.png

In my /var/www/colinm_de path I just have a simple index.html file with some text.
Now if I access 192.168.178.93 from any device within my network, I can view the website.
But now I also want that other people can view my website through the domain colinm.de, I already configured my Proxmox and VM to use static IP. So I went into my router settings and opened the port 80 (later on I can also open 443, if I get 80 to work) for the IP 192.168.178.93 and I went to my domain provider Namecheap.com and setup DNS configuration to following:
> A Record - @ - 192.168.178.93 - TTL to 1min
and
> A Record - www - 192.168.178.93 - TTL to 1min

Now if I want to access colinm.de following error occures in Chrome:
"Website unreachable. DNS_PROBE_FINISHED_NXDOMAIN" and when I try to access colinm.de through TOR Browser it first gives the warning that the connection is unsecure because it's not supported by HTTPS, then I press cotninue anyway and then following error occurs: "Website unreachable. ERR_SOCKS_CONNECTION_FAILED"

My /etc/hosts file in the VM looks like this:
Code:
127.0.0.1 localhost
127.0.1.1 ubuntu
127.0.1.1 colinm.de
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I tried to inspect the error log file of apache2, but I dont think there is any important messages.

- My Proxmox IP: 192.168.178.10
- My Ubuntu VM IP: 192.168.178.93
- My router IP: 192.168.178.1
 
Last edited:
Private Networks Like 192.168.x.y, 172.16-31.x.y and 10.x.y.z are NOT routed on the internet.

If you have a static IP on your router you can set can do this setup with that IP and port forwarding
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!