nginx+isp3config. Проблема с пуском по конфигу

MG
На сайте с 17.05.2013
Offline
0
5958

Добрый день. Очень нуждаюсь в помощи.

Полтора недели назад хотел расширить серверу максимально загружаймый файл.

Столкнулся с проблемой, не возможности перезпуска никса.

Т.к. он работал этим конфигом и до этого в кэше до вчерашнего дня.

Я не выдержал, и решил отправить в ребут сервер.

Настройка debian+nginx+isp3config

Консоль:

root@Debian-60-squeeze-32-minimal ~ # /etc/init.d/nginx start
Configuration test failed!
nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx/sites-enabled/site.com.vhost:64
nginx: configuration file /etc/nginx/nginx.conf test failed\

конфиг никс.конф

user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##

#include /etc/nginx/naxsi_core.rules;

##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##

#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
server {
listen localhost:110;
protocol pop3;
proxy on;
}

server {
listen localhost:143;
protocol imap;
proxy on;
## Disable .htaccess and other hidden files

location ~ \.php$ {
fastcgi_pass unix:/usr/local/zend/tmp/php-fastcgi.socket;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

конфиг сайта:

server {
listen *:80;

server_name site.com *.site.com;

root /var/www/clients/client1/web1/web;



index index.html index.htm index.php index.cgi index.pl index.xhtml;


location ~ \.shtml$ {
ssi on;
}


error_page 400 /error/400.html;
error_page 401 /error/401.html;
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 405 /error/405.html;
error_page 500 /error/500.html;
error_page 502 /error/502.html;
error_page 503 /error/503.html;
recursive_error_pages on;
location = /error/400.html {

internal;
}
location = /error/401.html {

internal;
}
location = /error/403.html {

internal;
}
location = /error/404.html {

internal;
}
location = /error/405.html {

internal;
}
location = /error/500.html {

internal;
}
location = /error/502.html {

internal;
}
location = /error/503.html {

internal;
}

error_log /var/log/ispconfig/httpd/site.com/error.log;
access_log /var/log/ispconfig/httpd/site.com/access.log combined;

location ~ /\. {
deny all;
access_log off;
log_not_found off;
}

location = /favicon.ico {
log_not_found off;
access_log off;
}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

location /stats {

index index.html index.php;
auth_basic "Members Only";
auth_basic_user_file /var/www/clients/client1/web1/web/stats/.htpasswd_stats;
}

location ^~ /awstats-icon {
alias /usr/share/awstats/icon;
}

location ~ \.php$ {
fastcgi_pass site.com:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location @php {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass site.com:9010;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_intercept_errors on;
}

location /cgi-bin/ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
root /var/www/clients/client1/web1;
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}

location / {
try_files $uri $uri/ /index.php?$uri&$args;
index index.php index.html;
}

location /internal_data/ {
internal;
}
location /library/ {
internal;
}
Andreyka
На сайте с 19.02.2005
Offline
822
#1

Вам указан файл и номер строки

Зачем вы постите все конфиги целиком?

Не стоит плодить сущности без необходимости
izyalex
На сайте с 06.04.2009
Offline
60
#2

unexpected end of file, expecting "}" in /etc/nginx/sites-enabled/site.com.vhost:64

Вам ни о чем не говорит?

Сpanel хостинг (http://bit.ly/Vjwlfl) и ISPmanager хостинг (http://bit.ly/11NnOqJ) от 119р./мес VIP Премиум хостинг (http://bit.ly/VibYQ9) в Москве, 1000р./мес и не парюсь
MG
На сайте с 17.05.2013
Offline
0
#3
Andreyka:
Вам указан файл и номер строки
Зачем вы постите все конфиги целиком?

nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx/sites-enabled/900-site.com.vhost:128

эта строчка пуста. а убрать скобку я не могу. не будет работать конфиг.

Конфиг рабочий 100%

Andreyka
На сайте с 19.02.2005
Offline
822
#4

Так вам пишет что наоборот, что там ожидалось }

:)

Den73
На сайте с 26.06.2010
Offline
523
#5

тс,

даю халявную ссылку http://translate.google.com/#en/ru если не в состояние прочитать то что вам говорит nginx.

[Удален]
#6

В основном конфиге блок server не закрыт.

MG
На сайте с 17.05.2013
Offline
0
#7
Dmitry.Sidorov:
В основном конфиге блок server не закрыт.

где ты видел, что бы сервер в конфиге исп закрывали?😮

MG
На сайте с 17.05.2013
Offline
0
#8
Dmitry.Sidorov:
В основном конфиге блок server не закрыт.

не помогает.

Andreyka
На сайте с 19.02.2005
Offline
822
#9

Будьте внимательны, смотрите за логической структурой

[Удален]
#10
mr god:
где ты видел, что бы сервер в конфиге исп закрывали?😮

Блок server должен начинаться с открывающейся фигурной скобки и заканчиваться закрывающейся:

http://nginx.org/ru/docs/http/ngx_http_core_module.html#server

http://nginx.org/ru/docs/mail/ngx_mail_core_module.html#server

У Вас в почтовом блоке один server не закрыт и в конфиге сайта тоже не закрыт.

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий