PHP on apache server http calling javascript api on tomcat server - php

client <<====>> apache http server(PHP) <<======>> Tomcat server( javascript api)
The client hits the PHP on apache http server, this intern should call a javascript api which returns a json object ,all the execution and loading should happen on apache http server and the client should not be involved once he/she has hit the PHP.
This runs fine if client directly calls the javascript on tomcat.
How can this be be done?
Will mod_jk connectors help in this?
client <<====>> apache http server(PHP) <<======>> Tomcat server( javascript api)

You can use PHP-cURL to do a request to the Tomcat server from you php script: http://php.net/manual/en/book.curl.php
Or, if you need something a bit simpler, just do file_get_contents to the http location: http://php.net/manual/en/function.file-get-contents.php

Related

WebSocket is not working with https request and its working fine with http using PHP ratchet Library

I don't know much about WebSocket, and I have implemented WebSocket using the ratchet PHP library, but it is working HTTP request, but not working with HTTPS request on the some code on google APP engine. my website code hosted on google APP engine and my socket code is hosted on google compute engine.
Is there confirmation on Apache server? If Yes then Can you please suggest me?
For SSL Request please make changes in "/etc/apache2/sites-available/000-default-le-ssl.conf" file at end.
ProxyPass /wss2/ ws://domainname.com:8080/
Also to make changes in your send request file WebSocket URL:
socket = new
WebSocket("wss://domainname.com/wss2/:8080/?parameter=parameterValue");
I have made mistakes in passing port to the wrong way when I call WebSocket using Angular

apache HTTP webserver for IOS app

I have a simple question. I have a website that runs on php/Mysqli and apache. Can I use the same stack for my IOS. Can I use Apache HTTP as my backend server for my IOS app. If it is not possible what backend server do you suggest other than firebase

Attach Eclipse php debugger to Apache server

I have built an app that sends requests to a server.
I also built a server to response those requests. I have a PHP server locally (LAMP).
Now, for debug purposes , I want to debug the requests that my app is sending to the server. But I don't want to do that separately (printing the app's request and than start debug the server with that request),
I want eclipse (PDT installed and xdebug) to stop at the first line of the PHP script running by the server WHEN the app is sending a request to the server.
How can I do that ?

Capturing outgoing traffic from localhost MAMP using Wireshark

I'm trying to capture outgoing SOAP (over HTTP) requests generated by one of my PHP scripts (being run on my localhost). I'm running MAMP and using the PHP NuSOAP library for sending the request, I filter to HTTP traffic in Wireshark but nothing shows up when I run the script (which is sending a SOAP request to an external server via HTTP). Any ideas?
Thanks

Is there a limit to POST over HTTPS for IIS 7?

I am building a web service in PHP that processes data received from a Windows application through a SOAP request. The Windows application is a bit of a black box but it generates a long stream of messages and then POSTS them as a single SOAP request.
Using HTTP this works and requests sized in multiple Mb's work fine.
Using HTTPS only small requests work larger requests fail with a Internal Server Error 500 and never make it to the PHP web service.
The PHP application itself runs on a W2008 server, under IIS7
Is there a setting that influences this or is there a known limit to HTTPS requests?

Categories