# DNS configuration to invoke complete URL

**URL:** <https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995>\
**Category:** NGINX\
**Created:** [May 19, 2015, 12:12pm UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995 "2015-05-19T12:12:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [May 19, 2015, 12:12pm UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/1 "2015-05-19T12:12:09Z")

</div>

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

I have configure DNS “[worsktream.com](http://worsktream.com)” to proxy pass the complete URL  
“[http://worsktream.com/workstream/agentLogin](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:

> **[DNS configuration to invoke complete URL](https://forum.nginx.org/read.php?2,258982,258982#msg-258982)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [May 22, 2015, 12:52am UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/2 "2015-05-22T00:52:56Z")

</div>

Can somebody answer my query pls.?

Posted at Nginx Forum:

> **[Re: DNS configuration to invoke complete URL](https://forum.nginx.org/read.php?2,258982,259050#msg-259050)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [May 22, 2015, 1:38am UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/3 "2015-05-22T01:38:30Z")

</div>

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](http://wiki.nginx.org/CoreModule#worker_rlimit_nofile)

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [May 22, 2015, 3:25pm UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/4 "2015-05-22T15:25:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [May 26, 2015, 4:20pm UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/5 "2015-05-26T16:20:57Z")

</div>

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](http://workspace.corp.no) should result in  
[corp.no](http://workspace.corp.no/workspace/agentLogin)

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:

> **[Re: DNS configuration to invoke complete URL](https://forum.nginx.org/read.php?2,258982,259136#msg-259136)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [May 27, 2015, 1:36am UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/6 "2015-05-27T01:36:10Z")

</div>

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

Hi there,

> accessing URL: [http://workspace.corp.no](http://workspace.corp.no) should result in  
> [http://workspace.corp.no/workspace/agentLogin](http://workspace.corp.no/workspace/agentLogin)

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [June 4, 2015, 11:29am UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/7 "2015-06-04T11:29:17Z")

</div>

Hi Francis

Expectation is to redirect the request to the absolute URL  
([corp.no](http://workspace.corp.no/workspace/agentLogin)) 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:

> **[Re: DNS configuration to invoke complete URL](https://forum.nginx.org/read.php?2,258982,259376#msg-259376)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [June 4, 2015, 5:13pm UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/8 "2015-06-04T17:13:23Z")

</div>

Does following line on \<workspace-dns-name\>  
work?  
  
location = / {  
 return 301  
[corp.no](http://workspace.corp.no/workspace/agentLogin;)  
}  
  
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.

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [June 8, 2015, 2:40pm UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/9 "2015-06-08T14:40:15Z")

</div>

Yes, the absolute URL [corp.no](http://workspace.corp.no/workspace/agentLogin)  
works  
fine

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

Posted at Nginx Forum:

> **[Re: Re:Re: DNS configuration to invoke complete URL](https://forum.nginx.org/read.php?2,258982,259427#msg-259427)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [June 9, 2015, 12:50am UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/10 "2015-06-09T00:50:08Z")

</div>

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

Hi there,

> Yes, the absolute URL [http://workspace.corp.no/workspace/agentLogin](http://workspace.corp.no/workspace/agentLogin) works  
> fine
> 
> I just need to understand the configuration approach to redirect the URL  
> request ([http://workspance](http://workspance)) to absolute url  
> ([http://workspace.corp.no/workspace/agentLogin](http://workspace.corp.no/workspace/agentLogin))

Was this not answered in [http://forum.nginx.org/read.php?2,258982,259381](http://forum.nginx.org/read.php?2,258982,259381)  
?

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  
[http://workspace.corp.no/workspace/agentLogin](http://workspace.corp.no/workspace/agentLogin); }

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![smsmaddy1981](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/919ad9/32.png) [@smsmaddy1981](https://www.ruby-forum.com/u/smsmaddy1981)\
**Post date:** [June 22, 2015, 12:25pm UTC](https://www.ruby-forum.com/t/dns-configuration-to-invoke-complete-url/241995/11 "2015-06-22T12:25:02Z")

</div>

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](http://workspace.corp.no/workspace/agentLogin);  
}

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:

> **[Re: Re:Re: DNS configuration to invoke complete URL](https://forum.nginx.org/read.php?2,258982,259782#msg-259782)**
>
> 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...
