# Transfering apache proxy settings to nginx

**URL:** <https://www.ruby-forum.com/t/transfering-apache-proxy-settings-to-nginx/204348>\
**Category:** NGINX\
**Created:** [March 10, 2011, 10:03am UTC](https://www.ruby-forum.com/t/transfering-apache-proxy-settings-to-nginx/204348 "2011-03-10T10:03:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 10, 2011, 10:03am UTC](https://www.ruby-forum.com/t/transfering-apache-proxy-settings-to-nginx/204348/1 "2011-03-10T10:03:06Z")

</div>

Hey!

I am moving from apache to nginx and i am having some problems with  
proxy settings. Apache settings are:

ProxyRequests Off  
ProxyPreserveHost Off

Order deny,allow  
Allow from all

ProxyPass /dirpath [http://sub.yourdomain.com/dirpath](http://sub.yourdomain.com/dirpath)  
ProxyPassReverse /dirpath [http://sub.yourdomain.com/dirpath](http://sub.yourdomain.com/dirpath)

```
  CacheEnable mem /dirpath/js
  MCacheSize 2048
  MCacheMaxObjectCount 100
  MCacheMinObjectSize 1
  MCacheMaxObjectSize 8192

```

I need these setting to load ajax file from another server and due to  
cross-domain security restrictions proxy is the only option.

Thank you!

Posted at Nginx Forum:

> **[Transfering apache proxy settings to nginx](https://forum.nginx.org/read.php?2,181902,181902#msg-181902)**
>
> Hey! I am moving from apache to nginx and i am having some problems with proxy settings. Apache settings are: \<IfModule mod\_proxy.c\> ProxyRequests Off ProxyPreserveHost Off \<Proxy \*\> Order deny,allow Allow
