Есть и такой ОС.
Модератор: weec
Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
-
Denffan
- проходил мимо
- Сообщения: 2
- Зарегистрирован: 2010-08-16 1:35:55
Непрочитанное сообщение
Denffan » 2010-08-16 1:40:30
Поставил nginx
по статье - hxxp://moreintelligentweb.net/post/555
но в консоле пишет:
Код: Выделить всё
root@server:/home/denis# sudo /etc/init.d/nginx start
Starting nginx: [warn]: duplicate MIME type "text/html" in /etc/nginx/nginx.conf:28
[emerg]: directive "location" has no opening "{" in /etc/nginx/sites-enabled/denis.vsi.ru:50
configuration file /etc/nginx/nginx.conf test failed
root@server:/home/denis#
Вот конфиг nginx
user www-data www-data;
worker_processes 2;
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;
access_log /var/log/nginx/access.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 3;
tcp_nodelay off;
gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml
application/xml+rss text/javascript;
include /etc/nginx/sites-enabled/*;
}
<тут должно что то быть? ругается именно на эту строчку>
Denffan
-
Хостинг HostFood.ru
-
Хостинг HostFood.ru
Тарифы на хостинг в России, от 12 рублей:
https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.:
https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах:
https://www.host-food.ru/domains/
-
Denffan
- проходил мимо
- Сообщения: 2
- Зарегистрирован: 2010-08-16 1:35:55
Непрочитанное сообщение
Denffan » 2010-08-16 1:52:02
вот еще конфиг /etc/nginx/sites-available/denis.vsi.ru
Код: Выделить всё
server {
listen 80;
server_name denis.vsi.ru www.denis.vsi.ru;
access_log /home/public_html/denis.vsi.ru/log/access.log;
error_log /home/public_html/denis.vsi.ru/log/error.log;
root /home/public_html/denis.vsi.ru/public;
charset utf-8;
location = / { rewrite . /index.php last; }
location / { rewrite ^(.*)$ /index.php?q=$1 last; }
location = /index.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /home/public_html/denis.vsi.ru/public$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
# To retrieve this script periodically use: curl -sH В«Host: my.host.tldВ» http://localhost/cron.php
location = /cron.php {
allow 127.0.0.1;
deny all;
fastcgi_pass 127.0.0.1:8521;
include /etc/nginx/fastcgi_params;
}
# Static content
location = /robots.txt { if (-f $document_root/sites/default/robots.txt) { rewrite . /sites/default/robots.txt; } break; }
location ~ ^(/sites/all)?/(modules|themes)/.*.(css|js|png|gif|jpg)$ { break; }
location /misc/ { break; }
location /sites/all/modules/fckeditor { break; }
location /files/ { break; } # Depending on Drupal configuration (Administer -> File system)
# Imagecache (http://drupal.org/project/imagecache)
location /files/imagecache/ {
if (-f $request_filename) { break; }
rewrite ^(.*)$ /index.php?q=$1 last;
}
# **** Comment out this location after installing/updating Drupal ****
# location ~ ^/(install|update).php$ {
# allow 172.22.11.2;
# deny all;
# fastcgi_pass 127.0.0.1:8521;
# include /etc/nginx/fastcgi_params;
# }
# ********************************************************************
# hide protected files
location ~* .(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(.php)?|xtmpl)$|^(code-style.pl|Entri$
deny all;
}
# hide backup_migrate files
location ~* ^/files/backup_migrate {
deny all;
}
}
Denffan
-
Burner
- лейтенант
- Сообщения: 693
- Зарегистрирован: 2009-06-14 7:02:26
Непрочитанное сообщение
Burner » 2010-08-16 5:23:06
вы что, читать не умеете? на 28 строчке первого конфига вы второй раз определяете mime-type, который уже задан в /etc/nginx/mime.types. В предпоследней директиве location второго конфига отсутствует открывающая фигурная скобка.
Burner