Hello, when I set a default vhosts with server_name _; it doesn't work.
Here the example file:
server {
listen 80;
server_name _ ; # underdash means for all hosts
location / {
root /var/www/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
}
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,61579,61579#msg-61579
on 2010-03-08 21:37
on 2010-03-08 22:28
See this: http://wiki.nginx.org/NginxHttpCoreModule#server_name And state your version and OS. Also the full config might help... -- () ascii-rubanda kampajno - kontraÅ html-a retpoÅto /\ ascii ribbon campaign - against html e-mail
on 2010-03-08 22:54
Hello! On Mon, Mar 08, 2010 at 03:36:46PM -0500, kleinchris wrote: > Hello, when I set a default vhosts with server_name _; it doesn't work. Here the example file: > server { > listen 80; > server_name _ ; # underdash means for all hosts It doesn't "means for all hosts". It's just some non-existant name. See here: http://nginx.org/en/docs/http/request_processing.html Maxim Dounin
on 2010-03-09 01:34
Maxim is right. Instead, use 'listen 80 default;' for that virtual host server block. Ray.
on 2010-03-09 01:48
Ah just used, know it works but on my other server I get a rewrite for marie3.briefdomain.de to http://www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.marie3.briefdomain.de/ o,o thanks the default helped me.. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,61579,61676#msg-61676
on 2010-03-09 01:51
And I want a domain to rewrite to www.domain.tld So that domain.tld and *.domain.tld would be redirected to www.domain.tld Posted at Nginx Forum: http://forum.nginx.org/read.php?2,61579,61677#msg-61677
on 2010-03-09 08:40
On Mon, Mar 08, 2010 at 07:50:52PM -0500, kleinchris wrote: > And I want a domain to rewrite to www.domain.tld > > So that domain.tld and *.domain.tld would be redirected to www.domain.tld http://nginx.org/en/docs/http/converting_rewrite_rules.html -- Igor Sysoev http://sysoev.ru/en/
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.