Django Doubling Host HeaderPython Upgrade Broke DjangoDeploying django with NginxWeb Server for...

Doomsday-clock for my fantasy planet

Mapping arrows in commutative diagrams

How many letters suffice to construct words with no repetition?

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Why was the "bread communication" in the arena of Catching Fire left out in the movie?

Need help identifying/translating a plaque in Tangier, Morocco

Domain expired, GoDaddy holds it and is asking more money

Is this food a bread or a loaf?

How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)

Is it possible to make sharp wind that can cut stuff from afar?

Can produce flame be used to grapple, or as an unarmed strike, in the right circumstances?

OA final episode explanation

What does "enim et" mean?

How can I fix this gap between bookcases I made?

Is there a familial term for apples and pears?

What is the meaning of "of trouble" in the following sentence?

How would photo IDs work for shapeshifters?

Crop image to path created in TikZ?

How to manage monthly salary

Why is my log file so massive? 22gb. I am running log backups

Unbreakable Formation vs. Cry of the Carnarium

Lied on resume at previous job

Some basic questions on halt and move in Turing machines



Django Doubling Host Header


Python Upgrade Broke DjangoDeploying django with NginxWeb Server for SVN+PHP+Django+RailsSend a custom HTTP header to one certain host onlyNginx & UserDir & PHPStructure of an HTTP Header?Nginx slow downloads even with low disk ioHow to make nginx connect php-fpm with 127.0.0.1, not server's public ip?Using an existing Django project in a new Docker containerdokuwiki, nginx and farms






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















For some reason, Django is now receiving a doubled host header. My url is testing.com, and I'm getting the error



Invalid HTTP_HOST header: 'testing.com,testing.com'. The domain name provided is not valid according to RFC 1034/1035.


which doesn't make any sense really. The allowed hosts are set as follows:



ALLOWED_HOSTS=['testing.com', 'www.testing.com']


I can't figure out for the life of me why the incoming header is doubled.
I have also provided my nginx configuration file for reference.



server { # redirection logic
listen 80; # port to listen on
return 301 https://$host$request_uri*;
}

server {
listen 443 ssl; # listen for HTTPS
server_name testing.com www.testing.com; # server name to use
ssl_certificate /etc/letsencrypt/live/testing.com/fullchain.pem; # ssl certs
ssl_certificate_key /etc/letsencrypt/live/dt-testing.com/privkey.pem;
location = /favicon.ico { access_log off; log_not_found off; } # site icon to use
location /static/ { # location of static files
root /websites/DT/path/;
}

location / {
proxy_set_header Host $host;
include proxy_params;
proxy_pass http://unix:/websites/DT/run/gunicorn.sock; # connector to gunicorn
#error_page 405 =200 $uri;
}

rewrite_log on;
error_log /var/log/nginx/error_log debug;
}











share|improve this question







New contributor




Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    For some reason, Django is now receiving a doubled host header. My url is testing.com, and I'm getting the error



    Invalid HTTP_HOST header: 'testing.com,testing.com'. The domain name provided is not valid according to RFC 1034/1035.


    which doesn't make any sense really. The allowed hosts are set as follows:



    ALLOWED_HOSTS=['testing.com', 'www.testing.com']


    I can't figure out for the life of me why the incoming header is doubled.
    I have also provided my nginx configuration file for reference.



    server { # redirection logic
    listen 80; # port to listen on
    return 301 https://$host$request_uri*;
    }

    server {
    listen 443 ssl; # listen for HTTPS
    server_name testing.com www.testing.com; # server name to use
    ssl_certificate /etc/letsencrypt/live/testing.com/fullchain.pem; # ssl certs
    ssl_certificate_key /etc/letsencrypt/live/dt-testing.com/privkey.pem;
    location = /favicon.ico { access_log off; log_not_found off; } # site icon to use
    location /static/ { # location of static files
    root /websites/DT/path/;
    }

    location / {
    proxy_set_header Host $host;
    include proxy_params;
    proxy_pass http://unix:/websites/DT/run/gunicorn.sock; # connector to gunicorn
    #error_page 405 =200 $uri;
    }

    rewrite_log on;
    error_log /var/log/nginx/error_log debug;
    }











    share|improve this question







    New contributor




    Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      For some reason, Django is now receiving a doubled host header. My url is testing.com, and I'm getting the error



      Invalid HTTP_HOST header: 'testing.com,testing.com'. The domain name provided is not valid according to RFC 1034/1035.


      which doesn't make any sense really. The allowed hosts are set as follows:



      ALLOWED_HOSTS=['testing.com', 'www.testing.com']


      I can't figure out for the life of me why the incoming header is doubled.
      I have also provided my nginx configuration file for reference.



      server { # redirection logic
      listen 80; # port to listen on
      return 301 https://$host$request_uri*;
      }

      server {
      listen 443 ssl; # listen for HTTPS
      server_name testing.com www.testing.com; # server name to use
      ssl_certificate /etc/letsencrypt/live/testing.com/fullchain.pem; # ssl certs
      ssl_certificate_key /etc/letsencrypt/live/dt-testing.com/privkey.pem;
      location = /favicon.ico { access_log off; log_not_found off; } # site icon to use
      location /static/ { # location of static files
      root /websites/DT/path/;
      }

      location / {
      proxy_set_header Host $host;
      include proxy_params;
      proxy_pass http://unix:/websites/DT/run/gunicorn.sock; # connector to gunicorn
      #error_page 405 =200 $uri;
      }

      rewrite_log on;
      error_log /var/log/nginx/error_log debug;
      }











      share|improve this question







      New contributor




      Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      For some reason, Django is now receiving a doubled host header. My url is testing.com, and I'm getting the error



      Invalid HTTP_HOST header: 'testing.com,testing.com'. The domain name provided is not valid according to RFC 1034/1035.


      which doesn't make any sense really. The allowed hosts are set as follows:



      ALLOWED_HOSTS=['testing.com', 'www.testing.com']


      I can't figure out for the life of me why the incoming header is doubled.
      I have also provided my nginx configuration file for reference.



      server { # redirection logic
      listen 80; # port to listen on
      return 301 https://$host$request_uri*;
      }

      server {
      listen 443 ssl; # listen for HTTPS
      server_name testing.com www.testing.com; # server name to use
      ssl_certificate /etc/letsencrypt/live/testing.com/fullchain.pem; # ssl certs
      ssl_certificate_key /etc/letsencrypt/live/dt-testing.com/privkey.pem;
      location = /favicon.ico { access_log off; log_not_found off; } # site icon to use
      location /static/ { # location of static files
      root /websites/DT/path/;
      }

      location / {
      proxy_set_header Host $host;
      include proxy_params;
      proxy_pass http://unix:/websites/DT/run/gunicorn.sock; # connector to gunicorn
      #error_page 405 =200 $uri;
      }

      rewrite_log on;
      error_log /var/log/nginx/error_log debug;
      }








      http nginx headers django






      share|improve this question







      New contributor




      Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 days ago









      MaxMax

      32




      32




      New contributor




      Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Max is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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
          });


          }
          });






          Max is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1422086%2fdjango-doubling-host-header%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Max is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Max is a new contributor. Be nice, and check out our Code of Conduct.













          Max is a new contributor. Be nice, and check out our Code of Conduct.












          Max is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • 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%2fsuperuser.com%2fquestions%2f1422086%2fdjango-doubling-host-header%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

          Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

          Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

          Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...