Apache Limiting proxypass based on http method
I am very new to apache and I have two services one for read and one for writes and both services support same locations. But this routing does not seem to work. Is there anyway I can restrict these based on Http methods
<VirtualHost *:1000>
ServerAdmin [email protected]
DocumentRoot "C:/Apache24/htdocs"
ServerName localhost:1000
ErrorLog "logs/example.com-error.log"
CustomLog "logs/example.com-access.log" common
ForensicLog "logs/forensic-log.log"
ProxyRequests Off
ProxyPreserveHost On
LogLevel debug
<Proxy *>
Require all granted
</Proxy>
#ReadService only supports GET
<Location /api/users>
ProxyPass http://localhost:5000/api/users connectiontimeout=5 timeout=300
ProxyPassReverse hhttp://localhost:5000/api/calls
</Location>
#WriteService anything other than GET
<Location /api/users>
ProxyPass http://localhost:7000/api/users connectiontimeout=5 timeout=300
ProxyPassReverse http://localhost:7000/api/users
</Location>
</VirtualHost>
RewriteCond %{REQUEST_METHOD} ^(GET)$
RewriteCond %{REQUEST_URI} ^/api/users(.*)$
RewriteRule ^/api/users(.*)$ http://localhost:5000/api/users$1 [P]
RewriteCond %{REQUEST_METHOD} !^(GET)$
RewriteCond %{REQUEST_URI} ^/api/users(.*)$
RewriteRule ^/api/users(.*)$ http://localhost:7000/api/users$1 [P]