Static content hits Nginx first. Why have it go to Nginx->Apache->ACLR->Nginx?
I altered the template for host to have:
location ~ \.php
Then the needed information for logging and proxy headers.
Now Nginx logs and serves all the static content and apache only serves PHP.
Why isn't it done that way? Is Nginx being used as a firewall/proxy is it being used to serve the static content faster?
btw here is my /template/custom/nginx_server.conf
|CUSTOM1|
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|
|?REALDOCROOT=`HOME`/domains/`DOMAIN`/public_html|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|
server
{
|CUSTOM|
listen |IP|:|PORT_80|;
|MULTI_IP|
server_name |DOMAIN|
www.|DOMAIN| |SERVER_ALIASES|;
access_log /var/log/nginx/domains/|DOMAIN|.log;
access_log /var/log/nginx/domains/|DOMAIN|.bytes bytes;
error_log /var/log/nginx/domains/|DOMAIN|.error.log;
root |DOCROOT|;
index index.php index.html index.htm;
|NGINX_PHP_CONF|
include /etc/nginx/nginx-security.conf;
|*if HAVE_NGINX_PROXY="1"|
location ~ \.php
{
|CUSTOM2|
|LOCATION_INSERT|
access_log off;
proxy_buffering |PROXY_BUFFERING|;
proxy_pass
http://|IP|:|PORT_8080|;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /nginx_static_files/
{
# access_log /var/log/nginx/access_log_proxy;
alias |DOCROOT|/;
internal;
}
|*else|
|NGINX_REDIRECTS|
|PROTECTED_DIRECTORIES|
|EXTRA_LOCATIONS|
|*endif|
|CUSTOM3|
include /etc/nginx/webapps.conf;
|CUSTOM4|