HowTo: AWStats and phpMyAdmin to Display Properly Using Nginx and Apache
I am now using Nginx to handle the static content on my server while using Apache to handle the dynamic content. Overall I am very happy with the switch. One issue I had was the images in AWStats and phpMyAdmin were not displaying because the static file regular expression I am using was overriding my /awstats location rule. The fix is quite easy. A new rule needs to be setup to override the original static file regular expression.
This code will only work if you are using Nginx to forward non static requests to Apache.
location ~* ^/(awstats|phpmyadmin) { proxy_pass http://127.0.0.1:8080; include /etc/nginx/proxy.conf; }
If you are already setup using Nginx + Apache, chances are you have a file similar to this below. If you have the proxy configurations copied and pasted into your files I would recommend making an includes file to keep your configuration files clean and readable.
proxy_redirect off; 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 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 32k; proxy_buffers 8 16k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k;
Quite simple to accomplish, though I will admit it took me a few minutes to figure out. Hope this helps.

ScifiToday