I've set up a remote reverse proxy server using nginx that is helping with traffic throttling to our website (lots of DDOS attacks lately). The website is currently built on an old version of Joomla.
When you try to download a file from the website, it redirects home rather than pushing the file download as it should.
an example link would be:
http://domain.com/index.php?option=com_docman&task=doc_download&gid=4753
My nginx config is as follows
# Initialize Rate Limiting
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
# Do Proxy Cache
proxy_cache_path /data/nginx/cache keys_zone=one:10m loader_threshold=300 loader_files=200 max_size=200m;
include /etc/nginx/sites-enabled/*;
server {
listen 80;
server_name www.domain.com;
return 301 $scheme://domain.com$request_uri;
}
server {
listen 80;
proxy_cache one;
server_name domain.com;
access_log /var/www/proxy/log/nginx.access.log;
error_log /var/www/proxy/log/nginx_error.log debug;
location / {
# apply rate limiting
limit_req zone=login burst=5;
resolver 127.0.0.1;
include /etc/nginx/conf.d/proxy.conf;
proxy_pass http://$host$uri;
}
}