nging vhost file: nginx works as a reverse proxy
cat /etc/vhosts/website.info
server {
error_log /var/log/nginx/vhost-error_log warn;
listen 1.2.3.4:80;
server_name website.info www.website.info;
access_log /usr/local/apache/domlogs/website.info-bytes_log bytes_log;
access_log /usr/local/apache/domlogs/website.info combined;
root /home/website/public_html;
location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
expires 7d;
try_files $uri @backend;
}
error_page 405 = @backend;
add_header X-Cache "HIT from Backend";
proxy_pass http://1.2.3.4:8081;
include proxy.inc;
}
location @backend {
internal;
proxy_pass http://1.2.3.4:8081;
include proxy.inc;
}
location ~ .*\.(php|jsp|cgi|pl|py)?$ {
proxy_pass http://1.2.3.4:8081;
include proxy.inc;
}
location ~ /\.ht {
deny all;
}
}
Then
ls -la /usr/local/apache/domlogs/website.info-bytes_log
/bin/ls: cannot access /usr/local/apache/domlogs/website.info-bytes_log: No such file or directory
/bin/ls: cannot access bytes_log: No such file or directory
ls -la /usr/local/apache/domlogs/website.info
-rw-r----- 2 root website 0 Jan 29 03:32 /usr/local/apache/domlogs/website.info
the access_logs are empty for some reason.
Now under Apache I saw this:
#CustomLog /usr/local/apache/domlogs/website.info combined
#CustomLog /usr/local/apache/domlogs/website.info-bytes_log "%{%s}t %I .\n%{%s}t %O ."
Could that be the issue as all the customlogs under apache got commented out?