nginx start unknown log format "bytes"
-
- Posts: 13
- Joined: Thu Nov 20, 2014 9:13 am
nginx start unknown log format "bytes"
sudo service nginx start
Starting nginx: nginx: [emerg] unknown log format "bytes" in /home/admin/conf/web/nginx.conf:11
[FAILED]
On that file:
(...)
location / {
proxy_pass http://193.234.225.138:8080;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|$
root /home/admin/web/domain.com/public_html;
access_log /var/log/httpd/domains/domain.com.log combined;
access_log /var/log/httpd/domains/domain.com.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
(...)
Clueless... I'll try to update vesta with the script.
Starting nginx: nginx: [emerg] unknown log format "bytes" in /home/admin/conf/web/nginx.conf:11
[FAILED]
On that file:
(...)
location / {
proxy_pass http://193.234.225.138:8080;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|$
root /home/admin/web/domain.com/public_html;
access_log /var/log/httpd/domains/domain.com.log combined;
access_log /var/log/httpd/domains/domain.com.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
(...)
Clueless... I'll try to update vesta with the script.
Last edited by nmpribeiro on Mon May 23, 2016 9:38 am, edited 1 time in total.
-
- Posts: 13
- Joined: Thu Nov 20, 2014 9:13 am
Re: nginx start unknown log format "bytes"
after some talk with the guys at freenode #nginx channel, I got into this documentation about 'log formats':
http://nginx.org/en/docs/http/ngx_http_ ... ml#example
Basically we're making an alias 'compression' that can then be issued as a directive like that:
Knowing that, I've edited '/etc/nginx/nginx.conf' and between line 'log_format main (...)' inside http {
and before 'access_log'; basically defining a new alias for a log_format, I inserted the following:
as the code pattern from viewtopic.php?t=4816 seams to indicate.
Hope this helps anyone that doesn't have an understanding of nginx and get's stuck on this error.
http://nginx.org/en/docs/http/ngx_http_ ... ml#example
Code: Select all
log_format compression '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
access_log /spool/logs/nginx-access.log compression buffer=32k;
Code: Select all
access_log /spool/logs/nginx-access.log compression buffer=32k;
and before 'access_log'; basically defining a new alias for a log_format, I inserted the following:
Code: Select all
log_format bytes '$body_bytes_sent';
Hope this helps anyone that doesn't have an understanding of nginx and get's stuck on this error.
Re: nginx start unknown log format "bytes"
Thanks for the information.
-
- Posts: 13
- Joined: Thu Nov 20, 2014 9:13 am
Re: nginx start unknown log format "bytes"
Basically, this means an update has packed the nginx.conf into nginx.conf.rpmsave (in my case) and written a new nginx.conf
Other problems might appear as well (in my case, I can't figure out how to make SSL's work heh)
Other problems might appear as well (in my case, I can't figure out how to make SSL's work heh)
-
- Posts: 7
- Joined: Tue May 05, 2020 9:46 pm
- Contact:
- Os: Ubuntu 17x
- Web: apache + nginx
Re: nginx start unknown log format "bytes"
In my case they are pointing to the latest domain I have created on the pannel. Example: every domain are pointing to last_domain.com. If I suspend last_domain.com they will all point to last_last_domain.com...
I dont know what to do!!!
I dont know what to do!!!
Re: nginx start unknown log format "bytes"
Does anyone figured this out. I am having the same issue. It is pointing to one site.