Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gozilla-paradise/2e709c96e1efcd4f3a82d4e1f0090472 to your computer and use it in GitHub Desktop.
Save gozilla-paradise/2e709c96e1efcd4f3a82d4e1f0090472 to your computer and use it in GitHub Desktop.
Reverse Proxy Setup with XAMPP/WAMP
Open apache httpd.conf file
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
- LoadModule proxy_connect_module modules/mod_proxy_connect.so
Open apache httpd-vhosts.conf
<VirtualHost *:80>
ProxyRequests On
<Proxy>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /api/ http://www.server.com/api/
ProxyPassReverse /api/ http://www.server.com/api/
Header set Access-Control-Allow-Origin "*"
</VirtualHost>
## /api/ == http://localhost/api/
## if you access http://localhost/api/ it should access http://www.server.com/api/
Restart Apache.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment