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 thought I would start with Apache.
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: 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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

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.

Submit an Answer