Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If yo use nginxcp best solution it's remove and reinstall.

I think it's bug.

On latest server with latest RELEASE of Cpanel same problem.

After uninstall & reinstall all work fine.

It's a poor solution, but it's solution for me.

share|improve this answer
    
I'm currently on 34.1.7 as well. Is it a CPanel bug? –  Tiffany Walker Jan 30 '13 at 17:44
    
I think no. Just remove and reinstall nginxcp and work perfectly –  abkrim Feb 3 '13 at 16:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.