Using Apache2, Port Forwarding, Tomcat, Cert-Bot, and JavaBridge

Using these combination is probably the easiest way to get your website running and be able to serve Java and PhP pages.

After fumbling around with other methods like mod_proxy, proxy_ajp, and mod_jk, I come to the conclusion that avoiding them all together is probably the best choice.

One of the best looking Java based CMS is OpenCMS and it runs great with Tomcat. However, the ssl certification process using cert-bot is just so much eaiser with Apache or Nginx. Using Port Forwarding you get the best of the both worlds with out messing with connectors.

Some good reference links I found that helped me getting it working.

Installing Apache2 and MariaDB

[Port Forwarding 80 to 8080] (https://askubuntu.com/questions/444729/redirect-port-80-to-8080-and-make-it-work-on-local-machine) - Also do it for port 443 to 8443 for secure site.

[CertBot for Ubuntu and Apache] (https://certbot.eff.org/lets-encrypt/ubuntubionic-apache.html)

[Intalling Tomcat] (https://linuxize.com/post/how-to-install-tomcat-9-on-ubuntu-18-04/)

[Finally JavaBridge] (http://php-java-bridge.sourceforge.net/pjb/)

Each step should get easier and after droping JavaBridge you can point your default site to it and start serving php pages, while still have to enviroment to install Java servlet pages, and run a CMS like OpenCMS

Here's a littel example side project I've been working on. My masternode verification page is written in PHP, but Minecraft plugins are written and ran in Java. Next roadblock is migrating the verification to Java and a plugin that can connect to the Chaincoin wallet from Minecraft.

Chaincoin Island

Logically and technically it should work, just need to code it out. Self made minecraft servers really helps in testing all the programming ideas you've had, and a nice easy web development to help validate your code is working is nice too.

For cloud vps hosting, I use and recommend Linode

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center