Forked from ralphcrisostomo/xampp_proxy_server_config
Created
December 8, 2015 09:28
-
-
Save jacmoe/a502933c51d518f6b7ef to your computer and use it in GitHub Desktop.
XAMPP Proxy Server Config
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
1. Open /Applications/XAMPP/etc/httpd.conf | |
2. Enable the following Modules by removing the # at the front of the line. | |
- LoadModule rewrite_module modules/mod_rewrite.so | |
- LoadModule proxy_module modules/mod_proxy.so | |
- LoadModule proxy_http_module modules/mod_proxy_http.so | |
3. Copy and Paste below to the bottom of httpd.conf | |
# Implements a proxy/gateway for Apache. | |
## Required modules: mod_proxy, mod_proxy_http | |
# | |
<IfModule mod_proxy.c> | |
# | |
# Reverse Proxy | |
# | |
ProxyRequests On | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyVia On | |
ProxyPass /api/ http://www.server.com/api/ | |
ProxyPassReverse /api/ http://www.server.com/api/ | |
ProxyPreserveHost On | |
</IfModule> | |
## /api/ == http://localhost/api/ | |
## if you access http://localhost/api/ it should access http://www.server.com/api/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment