Welcome! Log In Create A New Profile

Advanced

Nginx Vhost

siefke_listen@web.de
January 19, 2012 07:58PM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Vhost

siefke_listen@web.de January 19, 2012 07:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 109
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready