Падает nginx и apache
Добавлено: Чт окт 17, 2019 11:03 am
С недавних пор появилась странная ошибка, периодически стал отваливаться nginx и apache. Причина в том, что почему-то перезаписываются файлы !!default.conf в настройках.
Для nginx:
server {
listen :80;
server_name ;
root ;
access_log /etc/nginx/vhost_logs/!!default_access;
error_log /etc/nginx/vhost_logs/!!default_error;
location ~ /.well-known { allow all; }
# location ~* robots.txt { root /etc/nginx; }
location ~ /\.ht {
deny all;
access_log off;
log_not_found off;
}
location / {
root ;
proxy_pass http://:8080;
proxy_redirect off;
proxy_force_ranges on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache one;
proxy_cache_key "$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
#access_log /etc/nginx/vhost_logs/;
proxy_cache_valid 3s;
proxy_cache_min_uses 2;
# proxy_cache_lock on;
# proxy_cache_use_stale error timeout;
# proxy_cache_use_stale updating http_502 http_504;
limit_conn lone 100;
# limit_req zone=ltwo burst=10;
client_body_buffer_size 128k;
client_max_body_size 1024m;
proxy_connect_timeout 180;
proxy_send_timeout 180;
proxy_read_timeout 180;
send_timeout 180;
proxy_buffer_size 4k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 10m;
}
# error_page 404 /404.html;
# location = /40x.html {
# }
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
}
Для apache:
<VirtualHost :8080 >
ServerName.
........
DocumentRoot.
........
<------><------> SetEnvIf X-Forwarded-Proto https HTTPS=on
................
........................................
........
........
........
<Directory "">
.............
<------><------><------><------>AllowOverride All
............<--><------>
Require all granted
</Directory>
............................
............
............
............
............
............
............
CustomLog /etc/httpd/vhost_logs/!!default_access combined
ErrorLog /etc/httpd/vhost_logs/!!default_error
DirectoryIndex index.php index.html index.htm
........................
................
............................................
................<------><------>
<------><------>
</VirtualHost>
А также падает php-fpm процесс.
В чем может быть причина? Никто не сталкивался?
Для nginx:
server {
listen :80;
server_name ;
root ;
access_log /etc/nginx/vhost_logs/!!default_access;
error_log /etc/nginx/vhost_logs/!!default_error;
location ~ /.well-known { allow all; }
# location ~* robots.txt { root /etc/nginx; }
location ~ /\.ht {
deny all;
access_log off;
log_not_found off;
}
location / {
root ;
proxy_pass http://:8080;
proxy_redirect off;
proxy_force_ranges on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache one;
proxy_cache_key "$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
#access_log /etc/nginx/vhost_logs/;
proxy_cache_valid 3s;
proxy_cache_min_uses 2;
# proxy_cache_lock on;
# proxy_cache_use_stale error timeout;
# proxy_cache_use_stale updating http_502 http_504;
limit_conn lone 100;
# limit_req zone=ltwo burst=10;
client_body_buffer_size 128k;
client_max_body_size 1024m;
proxy_connect_timeout 180;
proxy_send_timeout 180;
proxy_read_timeout 180;
send_timeout 180;
proxy_buffer_size 4k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 10m;
}
# error_page 404 /404.html;
# location = /40x.html {
# }
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
}
Для apache:
<VirtualHost :8080 >
ServerName.
........
DocumentRoot.
........
<------><------> SetEnvIf X-Forwarded-Proto https HTTPS=on
................
........................................
........
........
........
<Directory "">
.............
<------><------><------><------>AllowOverride All
............<--><------>
Require all granted
</Directory>
............................
............
............
............
............
............
............
CustomLog /etc/httpd/vhost_logs/!!default_access combined
ErrorLog /etc/httpd/vhost_logs/!!default_error
DirectoryIndex index.php index.html index.htm
........................
................
............................................
................<------><------>
<------><------>
</VirtualHost>
А также падает php-fpm процесс.
В чем может быть причина? Никто не сталкивался?