I plan to use the Apache proxy module ie mod_proxy to forward an incoming HTTP POST request from a jump machine to another server inside a LAN.
I succeeded in forwarding pure HTTP request, but with the POST data I do not know why it just does not work.
My settings in /etc/httpd/conf/httpd.conf looks something like:
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /oozie/start_wf http://168.17.1.204:11000/oozie/v1/jobs?action=start
ProxyPassReverse /oozie/start_wf http://168.17.1.204:11000/oozie/v1/jobs?action=start
Is there anything more I need to add to this part of configuration?
The following entry on httpd.conf file should work.
Listen 80 <VirtualHost *:80> ProxyPreserveHost On ServerName mycompany.com ServerAlias mycompany.com ProxyPass /appServer http://<application_server_ip>:<port> ProxyPassReverse /appServer http://<application_server_ip>:<port> Redirect "/login" "/appServer/<application_context_root>/login" Redirect "/logout" "/appServer/<application_context_root>/logout" <Directory "/var/www/html"> order allow,deny allow from all RewriteEngine on RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^(.*) /index.html [NC,L] </Directory> </VirtualHost>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.