Created
October 26, 2011 18:09
-
-
Save ianmurrays/1317183 to your computer and use it in GitHub Desktop.
nginx as apache proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost 127.0.0.1:8080 | |
<VirtualHost 127.0.0.1:8080> | |
ServerAdmin [email protected] | |
ServerName domain.example.org | |
ServerAlias www.domain.example.org | |
DocumentRoot /path/to/docroot | |
ErrorLog /path/to/docroot/logs/error.log # Optional | |
CustomLog /path/to/docroot/logs/access.log combined # Optional | |
RPAFenable On | |
RPAFsethostname On | |
RPAFproxy_ips 127.0.0.1 | |
SuexecUserGroup user group | |
DirectoryIndex index.php index.html | |
<Directory /path/to/docroot> | |
Options FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name domain.example.org; | |
location / { | |
access_log off; | |
proxy_pass http://127.0.0.1:8080; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment