Welcome! Log In Create A New Profile

Advanced

Re: 'auto'rewrite link to a folder

Francis Daly
August 14, 2014 01:24PM
On Thu, Aug 14, 2014 at 04:33:04PM +0200, Pascale Camille wrote:

Hi there,

> root@www:/# curl -H Host:one.2maxi.com http://localhost/
> content of /tmp/www/one/index.html
> root@www:/# curl -H Host:nil.2maxi.com http://localhost/
> <html>
> <head><title>404 Not Found</title></head>
> <body bgcolor="white">
> <center><h1>404 Not Found</h1></center>
> <hr><center>nginx/1.2.1</center>
> </body>
> </html>
> root@www:/#

So: they both say that if the request gets to nginx, nginx responds as
you want it to.

> so in web browser i should see
> content of /tmp/www/one/index.html

....if the browser makes the request of nginx.

> but i have 'this page not available ... DNS lookup failed"

And that says that the browser did not know where nginx was.

You need your browser to be able to turn the hostnames one.2maxi.com and
nil.2maxi.com (and any others that you will use) into the IP address of
your nginx server.

This is usually either "set up dns right", or "populate your browser
machines etc/hosts file" -- but it might be "get resolution working on
your proxy server" or something else instead.

It's outside the scope of nginx, but may be useful to add to DNS many
individual A records, or a single wildcard one, for the hostnames that
you care about.

> and 2maxi.com/nil or what else gives 2maxi.com

That suggests that your browser can resolve 2maxi.com to the nginx server,
and hopefully it is clear from your configuration why the response was
what it was.

f
--
Francis Daly francis@daoine.org

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

'auto'rewrite link to a folder

Pascale Camille August 13, 2014 04:44PM

Re: 'auto'rewrite link to a folder

Francis Daly August 13, 2014 07:46PM

Re: 'auto'rewrite link to a folder

Pascale Camille August 14, 2014 03:14AM

Re: 'auto'rewrite link to a folder

Francis Daly August 14, 2014 05:02AM

full main.conf

Pascale Camille August 14, 2014 03:36AM

Re: 'auto'rewrite link to a folder

Pascale Camille August 14, 2014 10:34AM

Re: 'auto'rewrite link to a folder

Francis Daly August 14, 2014 01:24PM

Re: 'auto'rewrite link to a folder

bodomic August 14, 2014 10:47AM

Re: 'auto'rewrite link to a folder

Pascale Camille August 14, 2014 10:52AM

Re: 'auto'rewrite link to a folder

Pascale Camille August 14, 2014 11:56AM

Re: 'auto'rewrite link to a folder

Pascale Camille August 14, 2014 02:28PM

Re: 'auto'rewrite link to a folder

bodomic August 15, 2014 03:22AM

Re: [resolved]'auto'rewrite link to a folder

Pascale Camille August 15, 2014 11:46AM

Re: [resolved]'auto'rewrite link to a folder

Pascale Camille August 19, 2014 07:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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