So… Now that I’m back at it I can load the test page but the highlighted links give me a Tomcat 404 error page, so something is wrong. I found this guide to setting up Tomcat on Ubuntu LTS 22 here. First I need to a user setup in /etc/tomcat9/tomcat-users.xml.
</tomcat-users>
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="tomcat" password="pass" roles="admin-gui,manager-gui"/>
That should do the ticket for testing purposes. So ‘systemctl restart tomcat9’ and see what we get!
Nope. Still 404. I browsed through the server.xml config file and didn’t see anything wrong… Maybe I should confirm those files actually exist. I checked /var/www but nothing there, although I did notice that for some reason all users had write access to /var/www/thecweb.com (which is something a fucking moron would do if they ran into a permissions issue setting up their website…) So ‘chmod go-w thecweb.com’.
Back to tomcat! After some googling to find out where the missing files should be on disk I found that they simply weren’t in /usr/share like they should be. And ‘apt list –installed | grep tomcat’ finally gave me my answer!
cweb@thecweb:/var/lib/tomcat9/webapps/ROOT/META-INF$ apt list --installed | grep tomcat
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libtomcat9-java/jammy-updates,now 9.0.58-1ubuntu0.1 all [installed,automatic]
tomcat9-common/jammy-updates,now 9.0.58-1ubuntu0.1 all [installed,automatic]
tomcat9/jammy-updates,now 9.0.58-1ubuntu0.1 all [installed]
I somehow only managed to install tomcat9 and tomcat9-common packages. So I installed the missing packages and voila!
I’m going to take a break for now, but there is a small change I’ll jump back in later. It’s only 1 pm… And I’d like to get this running before my next work week starts.