apachesslvirtualhostvpsvirtual-hosts

Apache Admin/Manager page lost after adding Virtual Hosts


I wanted to host a couple of websites (and apps) on the same VPS, so my idea was to have it like this:

Site 1
- HTML content only

Site 2
- PHP and HTML content

Site 3
- Java / SpringBoot app

Site 4
- Python app

Site 5
- Java / SpringBoot app

So I got the smallest pack on DigitalOcean, and thought I would start with Apache. Note: I configured the OS already, and tested basic functionality (see more info below)

I installed Apache, configured it to work with my domain (an actual one, not from hosts) and it loaded the basic HTML page. Before I did this, I tested my-domain.com:8080 and it showed the Apache Admin page, all fine. Unfortunately, now after adding my first VirtualHost (and deleting the default one), my Admin page is not accessible anymore (getting a timeout). I also used Let's Encrypt to test how SSL works.

The current state of sites-enabled:

000-default: NOT ENABLED, doesn't work even if enabled
my-domain.com: ENABLED, working with SSL, redirects to SSL by default
my-domain2-from-hosts-file.com: ENABLED, not working, redirects to the default domain

Ideally, I'd like to have a different VirtualHost/domain for each WAR deployed, but let's get the admin/manager page working first.

What could I be doing wrong? I can post logs and config if needed.


Solution

  • Turns out firewall was the one to blame. Port 8080 became blocked after I added Let's Encrypt SSL using their script, so... that's weird.