Skip to content

Instantly share code, notes, and snippets.

@t-chab
Last active May 4, 2016 13:25
Show Gist options
  • Select an option

  • Save t-chab/30775e65bdd5cbc3bec3 to your computer and use it in GitHub Desktop.

Select an option

Save t-chab/30775e65bdd5cbc3bec3 to your computer and use it in GitHub Desktop.
Apache forward proxy sample config. TODO : https support
ServerRoot "/path/to/server/root"
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule headers_module modules/mod_headers.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
LoadModule log_config_module modules/mod_log_config.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule unixd_module modules/mod_unixd.so
LogLevel debug
ErrorLog "logs/error_httpd.log"
CustomLog "logs/access_httpd.log" "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
RequestHeader set Proxy-Authorization "Basic BASE64_ENCODED_PASSWORD"
SSLSessionCache "shmcb:run"
Listen 127.0.0.1:8888
ServerName localhost
PidFile run/httpd.pid
Mutex file:run default
ProxyRequests On
ProxyVia Full
ProxyRemote "*" "http://target.proxy:8000"
SSLProxyEngine on
SSLProxyVerify none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment