I have a working configuration in nginx which is like this
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|htm|html)$ {
root PATH_TO_STATIC_CONTENT;
}
}
How can I emulate this with apache ? I tried the below configuration but the static content do not serve.
<VirtualHost *:80>
ServerName example.com
DocumentRoot PATH_TO_STATIC CONTENT
<Location />
ProxyPass http://127.0.0.1:8000
</Location>
<LocationMatch SAME_REGEXP_AS_NGINX>
ProxyPass !
</LocationMatch>
</VirtualHost>
How can I get static content to serve in the same way as nginx does? Or is it even possible ? Thanks in advance