Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kerempuhh's avatar

Apache-tomcat7 & Laravel

I have Apache-tomcat server, have to run Laravel applications on it.

I added JavaBridge to apache-tomcat\webapps\ and c/p files ("JavaBridge.jar", "php-script.jar", "php-servlet.jar" to apache-tomcat\lib).

When tested in browser localhost:8080/JavaBridge it opens the page of JavaBridge.

I added a php folder to it, and created a phpinfo(). In browser localhost:8080/JavaBridge/php/testing.php it opened the info page of installed version of php on computer. When laravel was installed and opened in browser (localhost:8080/JavaBridge/php/laravel/public) it opens the welcome page of laravel.

Everything works nice and smoothly to this point. Then i added a table view, a control for loading data and set it up in route.

Route::get('company/load_company', 'companyController@load'); Route::get ('/', function() { return View::make('company'); });

Now everything was tested in XAMPP and it works great, no errors. But in tomcat i get the table view, but the data didn't load.

When i follow the link in console to see where the error is, i receive an error from apache-tomcat.

The error is:

HTTP Status 404 - JavaBridge/php/Test/public/company/load_company type status report mesage description The request resource is not available.

Apache Tomcat 7

As i said in XAMPP it works, but in tomcat not. How can i make it work in tomcat?

0 likes
4 replies
Chris Magnussen's avatar

I'm guessing this has something to do with the .htaccess file. Are you sure apache-tomcat even supports it ?

kerempuhh's avatar

Don't know, i was given apache tomcat, and task to make laravel work on it.

But since laravel is a php framework, and php works with JavaBridge on tomcat, i suppose that it has to work. That's why i asked for help, everything works except the route to get data.

Chris Magnussen's avatar

That's why I'm thinking it's the .htaccess file, as it is used to rewrite your URL's. company/load_company is rewrited, so if the .htaccess doesn't work in tomcat, the url wont work. Check tomcat's documentation for URL rewriting.

bashy's avatar

Any route not / or /index.php will be looking for a directory matching the URI. Mod_rewrite directs the URI segments to the index.php if they don't match a file or directory (directly).

It's probably not directing it properly?

Please or to participate in this conversation.