Code Monkey home page Code Monkey logo

Comments (4)

yaoweibin avatar yaoweibin commented on May 18, 2024

Try this:

check_http_send "GET /health HTTP/1.0\r\n Host: example.com\r\n\r\n";

On 2012-6-20 19:54, EugeneWHZ wrote:

Hi,

First of all thank you for great Nginx module!

During the healthcheck configuration I got an issue with the check_http_send directive. I need to specify the HOST header in my GET request, and as I know the HOSt header should start from new line, but I am having troubles with it.

I tried the following configurations and all of them are not working. Please advice how to correctly add the HOST header to the GET request?

check_http_send "GET /health HTTP/1.0\r\n\r\n Host: example.com\r\n\r\n";

check_http_send "GET /health HTTP/1.0"
'Host: example.com';

Thanks in advance!
Eugene


Reply to this email directly or view it on GitHub:
#43

Thanks,
-Weibin Yao

from nginx_tcp_proxy_module.

EugeneWHZ avatar EugeneWHZ commented on May 18, 2024

Hi,

Thank you for your prompt reply! I have tried to put the check_http_send
"GET /health HTTP/1.0\r\n Host: example.com\r\n\r\n"; but I still get
404 error.

Have you tried to use the Host header before? Do you have any other
ideas how to input the HOST header?

Thank you,
Eugene

On 20.06.2012 17:16, Weibin Yao(姚伟斌) wrote:

Try this:

check_http_send "GET /health HTTP/1.0\r\n Host: example.com\r\n\r\n";

On 2012-6-20 19:54, EugeneWHZ wrote:

Hi,

First of all thank you for great Nginx module!

During the healthcheck configuration I got an issue with the check_http_send directive. I need to specify the HOST header in my GET request, and as I know the HOSt header should start from new line, but I am having troubles with it.

I tried the following configurations and all of them are not working. Please advice how to correctly add the HOST header to the GET request?

check_http_send "GET /health HTTP/1.0\r\n\r\n Host: example.com\r\n\r\n";

check_http_send "GET /health HTTP/1.0"
'Host: example.com';

Thanks in advance!
Eugene


Reply to this email directly or view it on GitHub:
#43

from nginx_tcp_proxy_module.

yaoweibin avatar yaoweibin commented on May 18, 2024

Remove the space before the Host field? Have you add this page "/health"
in the backend?

GET /health HTTP/1.0\r\nHost: example.com\r\n\r\n

I have not used Host header before. But I think It should work.

On 2012-6-20 22:54, EugeneWHZ wrote:

Hi,

Thank you for your prompt reply! I have tried to put the check_http_send
"GET /health HTTP/1.0\r\n Host: example.com\r\n\r\n"; but I still get
404 error.

Have you tried to use the Host header before? Do you have any other
ideas how to input the HOST header?

Thank you,
Eugene

On 20.06.2012 17:16, Weibin Yao(姚伟斌) wrote:

Try this:

check_http_send "GET /health HTTP/1.0\r\n Host: example.com\r\n\r\n";

On 2012-6-20 19:54, EugeneWHZ wrote:

Hi,

First of all thank you for great Nginx module!

During the healthcheck configuration I got an issue with the check_http_send directive. I need to specify the HOST header in my GET request, and as I know the HOSt header should start from new line, but I am having troubles with it.

I tried the following configurations and all of them are not working. Please advice how to correctly add the HOST header to the GET request?

check_http_send "GET /health HTTP/1.0\r\n\r\n Host: example.com\r\n\r\n";

check_http_send "GET /health HTTP/1.0"
'Host: example.com';

Thanks in advance!
Eugene


Reply to this email directly or view it on GitHub:

#43

Reply to this email directly or view it on GitHub:
#43 (comment)

Thanks,
-Weibin Yao

from nginx_tcp_proxy_module.

EugeneWHZ avatar EugeneWHZ commented on May 18, 2024

Hi,

Thank you so much! Removing space before the Host field resolved the issue!

Thank you for your kind assistance!

Best Regards
Eugene

from nginx_tcp_proxy_module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.