Welcome! Log In Create A New Profile

Advanced

не запускается nginx

April 20, 2011 05:46AM
Здравствуйте,столкнулся с проблемой запуска nginx. Система ubuntu делаю так sudo gedit /etc/nginx/nginx.conf
все стираю и ставлю так user www-data;

worker_processes 1;



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

pid /var/run/nginx.pid;



events {

worker_connections 1024;

}



http {

include /etc/nginx/mime.types;

default_type application/octet-stream;

server_names_hash_bucket_size 64;

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



sendfile on;

#tcp_nopush on;



#keepalive_timeout 0;

keepalive_timeout 65;

tcp_nodelay on;





gzip on;

gzip_proxied any;

gzip_min_length 1100;

gzip_http_version 1.0;

gzip_buffers 4 8k;

gzip_comp_level 9;

gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;





include /etc/nginx/conf.d/*.conf;

include /etc/nginx/sites-enabled/*;

}
затем /etc/nginx/sites-enabled/1k.ru пишу туда

server {

listen 80

server_name 1k.ru;

access_log /var/log/nginx.access_log;

location ~* \.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|xml|docx|xlsx)$ {

root /var/www/1k.ru/;

index index.html index.php;

access_log off;

expires 30d;

}

location ~ /\.ht {

deny all;

}

location / {

proxy_pass http://127.0.0.1:81/;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-for $remote_addr;

proxy_set_header Host $host;

proxy_connect_timeout 60;

proxy_send_timeout 90;

proxy_read_timeout 90;

proxy_redirect off;

proxy_set_header Connection close;

proxy_pass_header Content-Type;

proxy_pass_header Content-Disposition;

proxy_pass_header Content-Length;

}

}

при запуске nginx`a вылазит вот такая ошибка [emerg] 10188#0: "server_name" parameter can be specified for the default "listen" directive only in /etc/nginx/sites-enabled/1k.ru:3
configuration file /etc/nginx/nginx.conf test failed что делать?
и еще хотел бы узнать как сделать чтобы сделать папку с сайтом /home/www/user/site.ru
Subject Author Posted

не запускается nginx

truper April 20, 2011 05:46AM

Re: не запускается nginx

kemko April 20, 2011 05:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 222
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready