Welcome! Log In Create A New Profile

Advanced

server_name ip_adress?

Nuno Magalhães
July 02, 2009 05:08PM
Hi,

This is a very basic question i haven't found an answer to. I have a
few virtual hosts, all under /path/to/nginxhtdocs/vhost1, vhost2, etc.
I want to set a catch-all so that if no server matches the request or
is someone uses the IP (namely me) they get the default server.

After a bunch of variations i'm using server_name _ ""; with a server
root of /path/to/nginxhtdocs but if i use the IP address to access it,
i get one of my vhosts. I assume it does this because it fails to
assume 'default' as a valid catch-all and the vhost it uses is the
first, alphabetically.

All i really want is to have other subfolders i want to access every
now and then, without a domain, so, just 192.0.2.33/somesubfolder for
testing purposes.

Is this achievable or do i always need a domain?

TIA,
Nuno Magalhães

--
() ascii ribbon campaign - against html e-mail
/\ ascii-rubanda kampajno - kontraŭ html-a retpoŝto
Subject Author Posted

server_name ip_adress?

Nuno Magalhães July 02, 2009 05:08PM

Re: server_name ip_adress?

Nuno Magalhães July 02, 2009 05:40PM

Re: server_name ip_adress?

Kirill A. Korinskiy July 03, 2009 02:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 260
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