2016-03-23 15 views
0

Kopyala + yapıştır, çok yavaş WP siteleri çalıştıran bir sunucu için Nginx config süper yavaş sayfa yüklemeleriyle. Ran ve nginx -t hatası: [emerg] "default_type" yönergesi yineleniyor

Nginx nedeniyle yukarıdaki hatalara yeniden olmaz ve bir kasıtsız sunucu yeniden başlatıldıktan sonra, aşağıdaki hata mevcutsa Apachebuddy.pl

kullanarak mSQL ve Apache yapılandırılmış:

Error: Unable to make action: Unable to manage service by nginxmng: ('start', 'nginx'). Error: [2016-03-22 22:14:01] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/nginx_control' '--start'] with exit code [1] Can not start proxy server: /usr/local/psa/admin/sbin/nginx-config execution failed: nginx: [emerg] "default_type" directive is duplicate in /etc/nginx/nginx.conf:32 nginx: configuration file /etc/nginx/nginx.conf test failed

İşte hatalı nginx olduğunu. conf

#user nginx; worker_processes 1; 
#error_log /var/log/nginx/error.log; #error_log /var/log/nginx/error.log  notice; #error_log /var/log/nginx/error.log info; 
#pid /var/run/nginx.pid; 
events { worker_connections 1024; } 
http { #include mime.types; default_type application/octet-stream; 
#log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; 
#access_log /var/log/nginx/access.log main; 
sendfile on; tcp_nopush on; types_hash_max_size 2048; server_names_hash_bucket_size 64; include /etc/nginx/mime.types; default_type application/octet-stream; 
keepalive_timeout 10; 
tcp_nodelay on; 
gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 9; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; 
#gzip_disable "MSIE [1-6]\.(?!.*SV1)"; include /etc/nginx/*.custom 
server_tokens off; 
location ~* .(ico|jpg|webp|jpeg|gif|css|png|js|ico|bmp|zip|woff)$ { access_log off; log_not_found off; add_header Pragma public; add_header Cache-Control "public"; expires 14d; 
location ~* .(php|html)$ { access_log off; log_not_found off; add_header Pragma public; add_header Cache-Control "public"; expires 14d; 
fastcgi_cache_path /dev/shm/nginx levels=1:2 keys_zone=stupidfast:16m max_size=1024m inactive=60m; 
fastcgi_pass_header Set-Cookie; fastcgi_pass_header Cookie; fastcgi_ignore_headers Cache-Control Expires Set-Cookie; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_split_path_info ^(.+.php)(/.+)$; 
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_intercept_errors on; include fastcgi_params; fastcgi_no_cache $no_cache; fastcgi_cache_bypass $no_cache; fastcgi_cache drm_custom_cache; fastcgi_cache_key $server_name|$request_uri; fastcgi_cache_valid 404 60m; fastcgi_cache_valid 200 60m; fastcgi_max_temp_file_size 4m; fastcgi_cache_use_stale updating; 
fastcgi_pass localhost:9000; { override global parameters e.g. worker_rlimit_nofile #include /etc/nginx/*global_params; 

cevap

0

Hata iletisi oldukça açık. Şu ana kadar: yapılandırma dosyası iki kez arasında http blokta

default_type application/octet-stream; 

.

Bunlardan birini çıkarın.