Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
не запускается nginx
- To: nginx-ru@xxxxxxxxx
- Subject: не запускается nginx
- From: "truper" <nginx-forum@xxxxxxxx>
- Date: Wed, 20 Apr 2011 05:46:08 -0400
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=XvhQUIpmilmKA6ePN+VvoJZwZSa0EmE3aZ2/+fzCaPU=; b=phjqZRhojqQsczMz9NTMgWtKtuG+h+sEYcClHNqL/8kVzmGfMRxXmm7fOyyg0f0dRd+c8cIhA2iy00NTGyFXz9DbHvnGlRYvTBV1gdIdJFzMWYZbvwnuWaQQvlD6fcTe;
Здравствуйте,столкнулся с проблемой
запуска 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
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,192533,192533#msg-192533
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|