5

I need to convert following nginx rule to Apache configuration. can anyone help me.

location /chat {
   rewrite            /chat(/.+)$ $1 break;
   proxy_pass         http://localhost:8000;
   proxy_set_header   Host $host;
   proxy_set_header   Cookie $http_cookie;
   proxy_buffering    off;
   proxy_send_timeout 310;
}
Prakash
  • 2,749
  • 4
  • 33
  • 43

2 Answers2

2

Have a look at the mod_proxy documentation, I think the ProxyPassMatch directive is of interest.

Orbling
  • 20,413
  • 3
  • 53
  • 64
1

I would convert them to Apache2 like:

ReWriteEngine on
ProxyPreserveHost On
ProxyPass "/chat"  "http://localhost:8000" flushpackets=on 
ProxyPassReverse "/chat"  "http://localhost:8000"
ProxyTimeout 310

in your <VirtualHost *:443> or <Location /chat> section

fero
  • 498
  • 4
  • 11