Nginx Vhost
siefke_listen at web.de
siefke_listen at web.de
Fri Jan 20 00:55:47 UTC 2012
Hello,
i have installed Nginx 1.0.11 on FreeBSD 9. I have configured a Catch All
Host and my Domain. But my Domain Nginx want not accept. He give only
the Catch All Domain back.
<config>
user www;
worker_processes 1;
error_log logs/error.log;
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 /var/log/www/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name _;
access_log logs/access.log main;
location / {
root /usr/local/www/nginx;
index index.html index.htm;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
}
#silviosiefke.de
server {
listen 80;
server_name silviosiefke.de;
access_log /usr/local/www/vhost/silviosiefke_de/log/access.log main;
error_log /usr/local/www/vhost/silviosiefke_de/log/error.log;
location / {
root /usr/local/www/vhost/silviosiefke_de/html;
index index.html index.htm index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
#location /article-(\d+)\.html$ {
#try_files $uri $uri/ /blogdetail.html?id=$1;
#}
# pass the PHP scripts to FastCGI
#location ~ \.(php|htm|html)$ {
#fastcgi_pass 127.0.0.1:9000;
#fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /usr/local/www/vhost/silviosiefke_de/html
$fastcgi_script_name;
#include /usr/local/etc/nginx/fastcgi_params; #}
#location ~ /\.ht {
#deny all;
#}
}
}
</config>
When i give the ip nginx use root /usr/local/www/nginx and when i call
silviosiefke.de, nginx give back the root /usr/local/www/nginx.
Where is the mistake? Thanks for help.
Regards
Silvio
More information about the nginx
mailing list