Welcome! Log In Create A New Profile

Advanced

Default host is being ignored?

June 08, 2014 01:50PM
I created a default conf file:

server {
listen 80 default;
listen 443 default;
server_name "";
return 444;
}


and linked it in sites-enabled.

The other server is declared with:

server {
listen 80;
listen 443 ssl;

server_name .mydomain.com;

Accessing the https://xx.xx.xx.xx (the IP address) uses the mydomain.com host instead of using the default, which should reject the request. The browser is sending the host as "xx.xx.xx.xx". This should not match the mydomain.com file. So why is it it not using the right server?

I've also tried leaving server name blank and adding "ssl" after 443 in the listen directive, but it still ignores the default server and uses the domain.com one instead.
Subject Author Posted

Default host is being ignored?

nrahl June 08, 2014 01:50PM

Re: Default host is being ignored?

B.R. June 09, 2014 11:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready