Привет.
Создал пару виртуальных хостов, и по ip адресу все открывает ок, а по названию редиректит на одно и то же, и не открывает сам хост.
В чем может быть проблема?
nginx.conf
worker_processes 2;
error_log /usr/local/etc/nginx/logs/error.log debug;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/etc/nginx/logs/access.log main;
sendfile on;
keepalive_timeout 65;
index index.html index.php;
include /usr/local/etc/nginx/sites-enabled/*;
}
пример одного из хостов:
server {
listen 81;
server_name work.dev www.work.dev;
root /private/var/www/work.dev/www;
index index.php;
access_log /private/var/www/work.dev/logs/access.log;
error_log /private/var/www/work.dev/logs/error.log;
ssl on;
ssl_certificate ssl/work.dev.crt;
ssl_certificate_key ssl/work.dev.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
include /usr/local/etc/nginx/conf.d/php-fpm;
}
файл /etc/hosts:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 test.dev
127.0.0.1 work.dev
127.0.0.1 hiwork.dev
127.0.0.1 learning.dev
Помогите, очень срочно.