Is there an apache-like web server in java?

Th
- in Servers
4

I'm looking for a web server that is similar to apache and includes PHP, but packaged in a single .jar file. So that you can start the web server such as a Minecraft server.

Re

There are of course "web servers" in Java (Tomcat or Jetty would be well-known examples, including Undertow), but none with a built-in PHP interpreter. These servers are built to run Java services. In the case of Jetty, however, you could go via FCGI: https://zetcode.com/java/jetty/fastcgi/

So that you can start the web server such as a Minecraft server.

You can start any web server "like a Minecraft server". No matter what language it is developed in.

Th

Yes, my aim is to pack a web server in a Minecraft hosting, with ready-made java arguments. Is working.

Re

Then you can forget about PHP. I could hypothetically imagine that this would be packed into the JAR and via JNA… But it gets really tedious there.

You can embed a jetty anywhere. Then do JSP instead of PHP.

Th

All right, thanks for your answer, I'll have a look.