PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, June 25, 2022

[FIXED] How to forward request from apache web server module to application server

 June 25, 2022     apache-modules, apache2, http-proxy, proxypass, reverse-proxy     No comments   

Issue

I should be able to intercept the request using apache modules and after that I should be able to forward that request to application server.

I wrote one module in apache web server, that module will intercept the requests and sending the response.

When I try only with apache module using following configuration it is working fine.

<Location "/test.html">
SetHandler my_module
</Location>

When I try only with ProxyPass configuration as below in that case also it is working fine.

<Location "/test.html">
ProxyPass   "http://192.168.124.1:8080/test/myservlet"
</Location>

But, if I want both functionalities in that case it is not working. i.e initially I should be able to intercept the request and after that I should be able to forward that request to application server. Can someone please suggest me the approach for this?.


Solution

You should return DECLINED from your ap_hook_handler() function, or use a different "hook" such as "ap_hook_fixups" which allows more than 1 module to take action.



Answered By - covener
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing