How can I dump nginx requests for a specific location while nginx is secured?In Nginx, how can I rewrite all...

Sometimes a banana is just a banana

Six real numbers so that product of any five is the sixth one

Why is working on the same position for more than 15 years not a red flag?

Manipulate scientific format without the "e"

What is a term for a function that when called repeatedly, has the same effect as calling once?

Rationale to prefer local variables over instance variables?

A right or the right?

my breadboard simulation doesn't work properly

Real life puzzle: Unknown alphabet or shorthand

Is the helping verb 'werden' mandatory in both passive clauses separated by an 'oder', or only at the very the end?

A "strange" unit radio astronomy

VAT refund for a conference ticket in Sweden

Is divide-by-zero a security vulnerability?

Logistics of a hovering watercraft in a fantasy setting

Book about a time-travel war fought by computers

Citing contemporaneous (interlaced?) preprints

Are small insurances worth it

How to kill a localhost:8080

How would we write a misogynistic character without offending people?

Is there any relevance to Thor getting his hair cut other than comedic value?

Is it possible to keep the Ring of Winter if you manage to acquire it?

Filling in Area Under Curve Causes Alignment Issues

Practical reasons to have both a large police force and bounty hunting network?

What happened to QGIS 2.x



How can I dump nginx requests for a specific location while nginx is secured?


In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?How can I see which flags Nginx was compiled with?nginx: dump HTTP requests for debuggingHow do I save a dump file of a running process to a specific disk location?TCP dump used for and how can it be usedNginx location block specific filePPPoE Connection : “Generic-Error ”RP-PPPoE: Child pppd process terminated"Nginx not outputting correct chunked responsesLog requests for a specific locationNginx - location specific root













0















I want to dump all request that nginx is getting for a specific location so I can debug a strange problem that I have.



Usually tcpdump would be the solution but remember that nginx is accessed using HTTPS so dumping secured packages wouldn't be useful.



Note: in fact I am mostly intereted to dump all headers as I need to find out if any proxy modified the requests made by the client.



Obviously, I already used Wireshark or Charles on the client side but I came to the conclusion that that reaches the server is different that what it was sent by the client.










share|improve this question














bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Depending on your encryption you can decrypt the ssl traffix with wirshark if you have access to the ssl key. This works with RSA.

    – Christopher Perrin
    Aug 5 '13 at 18:12











  • Thanks @ChristopherPerrin ... I was hopping for something easier than this, especially that I can control the NGINX which is used only as a frontend to another webserver.

    – sorin
    Aug 5 '13 at 18:19
















0















I want to dump all request that nginx is getting for a specific location so I can debug a strange problem that I have.



Usually tcpdump would be the solution but remember that nginx is accessed using HTTPS so dumping secured packages wouldn't be useful.



Note: in fact I am mostly intereted to dump all headers as I need to find out if any proxy modified the requests made by the client.



Obviously, I already used Wireshark or Charles on the client side but I came to the conclusion that that reaches the server is different that what it was sent by the client.










share|improve this question














bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Depending on your encryption you can decrypt the ssl traffix with wirshark if you have access to the ssl key. This works with RSA.

    – Christopher Perrin
    Aug 5 '13 at 18:12











  • Thanks @ChristopherPerrin ... I was hopping for something easier than this, especially that I can control the NGINX which is used only as a frontend to another webserver.

    – sorin
    Aug 5 '13 at 18:19














0












0








0








I want to dump all request that nginx is getting for a specific location so I can debug a strange problem that I have.



Usually tcpdump would be the solution but remember that nginx is accessed using HTTPS so dumping secured packages wouldn't be useful.



Note: in fact I am mostly intereted to dump all headers as I need to find out if any proxy modified the requests made by the client.



Obviously, I already used Wireshark or Charles on the client side but I came to the conclusion that that reaches the server is different that what it was sent by the client.










share|improve this question














I want to dump all request that nginx is getting for a specific location so I can debug a strange problem that I have.



Usually tcpdump would be the solution but remember that nginx is accessed using HTTPS so dumping secured packages wouldn't be useful.



Note: in fact I am mostly intereted to dump all headers as I need to find out if any proxy modified the requests made by the client.



Obviously, I already used Wireshark or Charles on the client side but I came to the conclusion that that reaches the server is different that what it was sent by the client.







nginx tcpdump dump






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 5 '13 at 17:41









sorinsorin

3,402195184




3,402195184





bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Depending on your encryption you can decrypt the ssl traffix with wirshark if you have access to the ssl key. This works with RSA.

    – Christopher Perrin
    Aug 5 '13 at 18:12











  • Thanks @ChristopherPerrin ... I was hopping for something easier than this, especially that I can control the NGINX which is used only as a frontend to another webserver.

    – sorin
    Aug 5 '13 at 18:19














  • 1





    Depending on your encryption you can decrypt the ssl traffix with wirshark if you have access to the ssl key. This works with RSA.

    – Christopher Perrin
    Aug 5 '13 at 18:12











  • Thanks @ChristopherPerrin ... I was hopping for something easier than this, especially that I can control the NGINX which is used only as a frontend to another webserver.

    – sorin
    Aug 5 '13 at 18:19








1




1





Depending on your encryption you can decrypt the ssl traffix with wirshark if you have access to the ssl key. This works with RSA.

– Christopher Perrin
Aug 5 '13 at 18:12





Depending on your encryption you can decrypt the ssl traffix with wirshark if you have access to the ssl key. This works with RSA.

– Christopher Perrin
Aug 5 '13 at 18:12













Thanks @ChristopherPerrin ... I was hopping for something easier than this, especially that I can control the NGINX which is used only as a frontend to another webserver.

– sorin
Aug 5 '13 at 18:19





Thanks @ChristopherPerrin ... I was hopping for something easier than this, especially that I can control the NGINX which is used only as a frontend to another webserver.

– sorin
Aug 5 '13 at 18:19










1 Answer
1






active

oldest

votes


















0














You can but only for predefined headers. With a combination of the nginx geo module and a custom log format.



geo $geo  {
default 0;
127.0.0.1/32 1;
192.168.1.0/24 1;
10.1.0.0/16 1;
}

server {
log_format custom '$remote_addr - HEADERS: $sent_http_content_range';

if($geo) {
access_log bad.log custom;
}
}





share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "2"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f528800%2fhow-can-i-dump-nginx-requests-for-a-specific-location-while-nginx-is-secured%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can but only for predefined headers. With a combination of the nginx geo module and a custom log format.



    geo $geo  {
    default 0;
    127.0.0.1/32 1;
    192.168.1.0/24 1;
    10.1.0.0/16 1;
    }

    server {
    log_format custom '$remote_addr - HEADERS: $sent_http_content_range';

    if($geo) {
    access_log bad.log custom;
    }
    }





    share|improve this answer




























      0














      You can but only for predefined headers. With a combination of the nginx geo module and a custom log format.



      geo $geo  {
      default 0;
      127.0.0.1/32 1;
      192.168.1.0/24 1;
      10.1.0.0/16 1;
      }

      server {
      log_format custom '$remote_addr - HEADERS: $sent_http_content_range';

      if($geo) {
      access_log bad.log custom;
      }
      }





      share|improve this answer


























        0












        0








        0







        You can but only for predefined headers. With a combination of the nginx geo module and a custom log format.



        geo $geo  {
        default 0;
        127.0.0.1/32 1;
        192.168.1.0/24 1;
        10.1.0.0/16 1;
        }

        server {
        log_format custom '$remote_addr - HEADERS: $sent_http_content_range';

        if($geo) {
        access_log bad.log custom;
        }
        }





        share|improve this answer













        You can but only for predefined headers. With a combination of the nginx geo module and a custom log format.



        geo $geo  {
        default 0;
        127.0.0.1/32 1;
        192.168.1.0/24 1;
        10.1.0.0/16 1;
        }

        server {
        log_format custom '$remote_addr - HEADERS: $sent_http_content_range';

        if($geo) {
        access_log bad.log custom;
        }
        }






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 5 '13 at 18:29









        Christopher PerrinChristopher Perrin

        4,7701329




        4,7701329






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f528800%2fhow-can-i-dump-nginx-requests-for-a-specific-location-while-nginx-is-secured%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

            Список ссавців Італії Природоохоронні статуси | Список |...

            Українські прізвища Зміст Історичні відомості |...