Skip to content

Instantly share code, notes, and snippets.

@kaworu
Created March 27, 2013 20:29
Show Gist options
  • Save kaworu/5257723 to your computer and use it in GitHub Desktop.
Save kaworu/5257723 to your computer and use it in GitHub Desktop.
nginx & apache proxy config
[...]
<IfModule proxy_module>
ProxyPass /rspamd http://localhost:11336
ProxyPassReverse /rspamd http://localhost:11336
</IfModule>
Alias /rspamdadmin "/usr/local/www/rspamdadmin"
<Directory "/usr/local/www/rspamdadmin">
Options none
AllowOverride Limit
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
# The Allow directive below MUST be changed/removed or replaced with 'Allow from 1.2.3.4', where 1.2.3.4 is the IP address of your workstation
Allow from all
</Directory>
[...]
[...]
server {
#listen 443;
#listen [::]:443;
listen 80;
listen [::]:80;
server_name ~^mail\..*\.(ch|li)$;
#ssl on;
#ssl_certificate /usr/local/etc/nginx/ssl/mail.crt;
#ssl_certificate_key /usr/local/etc/nginx/ssl/mail.key;
location / {
root /var/empty;
# needed for HTTPS
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_pass http://91.121.10.176:8080;
}
}
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment