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

Saturday, June 25, 2022

[FIXED] What is the difference between the proxy_pass and redirect?

 June 25, 2022     apache2.4, http-redirect, reverse-proxy, ubuntu-18.04     No comments   

Issue

I'm setting up the WAF with feature of reverse proxy, and have the config in /etc/apache2/sites-available/000-default.conf. then i have to setting the WAF as reverse proxy. Can i use redirect in exchange for proxy_pass? what is the difference between them?

I already setup the reverse proxy but always end up with my web application functional problem, but when i use redirect everything just work fine.

This is my 000-default.conf for reverse proxy:

<VirtualHost *:80>
    ServerName https://mywebsite.com/
    ProxyPass / https://10.10.123.32:443/
    ProxyPassReverse / https://10.10.123.32:443/
    ProxyPreserveHost on
    SSLProxyEngine on
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSL ProxyCheckPeerExpire off
</VirtualHost>

-is that anything wrong with my reverse proxy config? -and it's okay to use redirect as the replacement for proxy_pass setting? -if that okay, whether the waf function will still run?

Thank you :)


Solution

ProxyPass instructs Apache to forward the request to the named backend server and forward the response to the client.

Redirect instructs Apache to respond directly to the client with a substitute URL.

It would rarely be effective for a WAF to send a redirect instead of acting as a proxy/gateway/middleman as the WAF would not really be in the loop for the traffic. Further, usually your client can't do anything with the direct address of what is likely an internal server.



Answered By - covener
Answer Checked By - David Goodson (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