DNS configuration to invoke complete URL

Hi Talents,
Need your support immediately on the below requirement:

I have configure DNS “worsktream.com” to proxy pass the complete URL
http://worsktream.com/workstream/agentLogin
while invoking the dns name following message is thrown:

  • error 414 Request-URI Too Large

And after configuring following to fix the above issue
syntax: large_client_header_buffers number size
default: large_client_header_buffers 4 4k/8k

Now, the below issue is reported

  • nginx accept() failed (24 too many open files)

I could see the logs are getting piled up with so many hits on the
request
URL. Indefinite loop is seen.

Please suggest to resolve this.

Best regards,
Maddy

Posted at Nginx Forum:

Can somebody answer my query pls.?

Posted at Nginx Forum:

First thing I would have done is to check max open file limit in system
where I am getting it error.
YOu can check that by “ulimit -a” command. If it is very low then
increasing it might fix it.

Alternatively you can try playing with config NGINX
http://wiki.nginx.org/CoreModule#worker_rlimit_nofile

On Thursday 21 May 2015 18:52:25 smsmaddy1981 wrote:

Can somebody answer my query pls.?

You’re probably right about the proxying loop, but there’s no
way to answer your question until you provide some information.

It’s always a good idea to start any question with providing output
of “nginx -V”, your configuration, and an explanation of what you’re
doing, what you actually see, what you expect to see.

wbr, Valentin V. Bartenev

Thanks for the response #Vikrant and #Valentin

Below are the issue details:

What I have Configured:

server {
listen 80;
server_name workspace.corp.no;

   location / {
      proxy_pass http://workspace.corp.no/workspace/agentLogin;
   }
}

Expected to see:
accessing URL: http://workspace.corp.no should result in
corp.no

What I see:
Indefinite requests piled up in the logs as shown below
access.log
/workspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace/agentLoginworkspace

error.log
28457#0: *9100 socket() failed (24: Too many open files) while
connecting to
upstream, client:

Suggest, how do I achieve invoking the DNS should call the required
absolute
URL?

Posted at Nginx Forum:

On Tue, May 26, 2015 at 10:20:27AM -0400, smsmaddy1981 wrote:

Hi there,

accessing URL: http://workspace.corp.no should result in
corp.no

What, specifically, do you mean by that?

You want to see a http redirect to the new url? Or you want to see some
other content?

Where does that other content come from?

What I see:
Indefinite requests piled up in the logs as shown below

That infinite loop matches what you have configured (assuming that the
nginx machine resolves the name workspace.corp.no to an address that
this nginx listens on).

Suggest, how do I achieve invoking the DNS should call the required absolute
URL?

I’m afraid that I do not know what you mean by that.

After you explain the behaviour you want, it may become clear how to
configure nginx to achieve that behaviour.

Good luck with it,

f

Francis D. [email protected]

Hi Francis

Expectation is to redirect the request to the absolute URL
(corp.no) when an end user access
the
request http://

NGINX is installed on server Node-01
The content to be loaded (workspace-dns-name) is deployed on another
server
Node-02

Steps to achieve pls.?

Best regards,
Madhu

Posted at Nginx Forum:

Does following line on <workspace-dns-name>
work?

location = / {
return 301
corp.no
}

You need
some web server on <workspace-dns-name> to return a 301.
Or
you can try port forwarding to Node-01, although IMHO, not a good idea.

Yes, the absolute URL corp.no
works
fine

I just need to understand the configuration approach to redirect the URL
request (http://workspance) to absolute url
(corp.no)

Posted at Nginx Forum:

On Mon, Jun 08, 2015 at 08:39:51AM -0400, smsmaddy1981 wrote:

Hi there,

Yes, the absolute URL corp.no works
fine

I just need to understand the configuration approach to redirect the URL
request (http://workspance) to absolute url
(corp.no)

Was this not answered in Re:Re: DNS configuration to invoke complete URL
?

If the servers workspace.corp.no and workspance are the same, then

location = / { return 301 /workspace/agentLogin; }

and if they are two different servers, then on the workspance one:

location = / { return 301
corp.no; }

f

Francis D. [email protected]

Thanks everyone and sorry for the late reply here…due to OS upgrade
from
IT team.

I tried using return directive to invoke the absolute URL and below case
is
true :

– if they are two different servers, then on the workspance one:
location = / { return 301 corp.no;
}

This resulted in an error message during nginx restart “unknown
directive
return”. And working nginx version is #1.6.3. FYI, nginx installation
was
successful installing pcre, pcre-devel packages (latest)

Not sure, how to resolve this (return directive issue)???


Later I attempted to configure below way and IS WORKING…

server {
   listen 80;
   server_name workspace.corp.no;

   location /{
      proxy_pass http://workspace123/workspace/agentLogin/;
   }
}

NOT SURE, IF THIS IS THE RIGHT APROACH?

//Maddy

Posted at Nginx Forum: