Понравилась мне тема по расширению веб интерфейса http://forum.zyxmon.org/topic408-dopoln … rsiya.html, установил всё работает хорошо, но вот проблема.
Хочу добавить в nginx.conf
ещё секцию
server {
listen 80;
server_name g****n.dyndns.org;
location / {
root /media/DISK_A1/NOD32/base/;
index index.html index.htm;
}
При starte nginx пишет " nginx [emerg] "server" directive is not allowed here in".
Вот привожу полный конфиг
user root;
worker_processes 1;
#error_log /media/DISK_A1/system/var/log/nginx_error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 50;
}
http {
include mime.types;
index index.php index.html index.htm;
default_type text/html;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
server {
listen 88; # Port, make sure it is not in conflict with another http daemon.
server_name localhost;
#server_name_in_redirect off; # Change this, reference -> http://nginx.org/en/docs/http/server_names.html
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 32k;
fastcgi_buffers 4 32k;
fastcgi_busy_buffers_size 32k;
fastcgi_temp_file_write_size 32k;
client_body_timeout 10;
client_header_timeout 10;
send_timeout 60; # 60 sec should be enough, if experiencing alof of timeouts, increase this.
output_buffers 1 32k;
postpone_output 1460;
root /media/DISK_A1/system/web; # Your document root, where all public material is.
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass unix:/tmp/php-fastcgi.socket;
#if (-f $request_filename) {
# # Only throw it at PHP-FPM if the file exists (prevents some PHP exploits)
# fastcgi_pass 127.0.0.1:911; # The upstream determined above
#}
server {
listen 80;
server_name g****n.dyndns.org;
location / {
root /media/DISK_A1/NOD32/base/;
index index.html index.htm;
}
}
}
}
}
Заранее благодарен.
Я понимаю ,что для некоторых это вообще смешно, но я только учусь
Отредактировано yuoras (2013-09-23 00:59:34)
Белый-Белый ZyXEL Keenetic I серии Zyxware перешёл на Entware