How do you install mod_wsgi?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







31















I ran the following commands



sudo apt-get install libapache2-mod-wsgi
sudo a2enmod mod-wsgi


I keep getting this extremely frustrating message



ERROR: Module mod-wsgi does not exist!


Please help.










share|improve this question




















  • 1





    sudo a2enmod will give you list of modules installed. Just enable wsgi as said by ajmitch

    – sagarchalise
    Feb 9 '11 at 5:20


















31















I ran the following commands



sudo apt-get install libapache2-mod-wsgi
sudo a2enmod mod-wsgi


I keep getting this extremely frustrating message



ERROR: Module mod-wsgi does not exist!


Please help.










share|improve this question




















  • 1





    sudo a2enmod will give you list of modules installed. Just enable wsgi as said by ajmitch

    – sagarchalise
    Feb 9 '11 at 5:20














31












31








31


5






I ran the following commands



sudo apt-get install libapache2-mod-wsgi
sudo a2enmod mod-wsgi


I keep getting this extremely frustrating message



ERROR: Module mod-wsgi does not exist!


Please help.










share|improve this question
















I ran the following commands



sudo apt-get install libapache2-mod-wsgi
sudo a2enmod mod-wsgi


I keep getting this extremely frustrating message



ERROR: Module mod-wsgi does not exist!


Please help.







server apache2 django






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 9 '11 at 20:56









8128

25k22101138




25k22101138










asked Feb 9 '11 at 1:50









myusuf3myusuf3

13.5k338099




13.5k338099








  • 1





    sudo a2enmod will give you list of modules installed. Just enable wsgi as said by ajmitch

    – sagarchalise
    Feb 9 '11 at 5:20














  • 1





    sudo a2enmod will give you list of modules installed. Just enable wsgi as said by ajmitch

    – sagarchalise
    Feb 9 '11 at 5:20








1




1





sudo a2enmod will give you list of modules installed. Just enable wsgi as said by ajmitch

– sagarchalise
Feb 9 '11 at 5:20





sudo a2enmod will give you list of modules installed. Just enable wsgi as said by ajmitch

– sagarchalise
Feb 9 '11 at 5:20










4 Answers
4






active

oldest

votes


















21














Using sudo a2enmod wsgi should enable the module for you once you reload apache, as most modules don't need the mod_ prefix when enabling them.






share|improve this answer
























  • i tried sudo a2enmod wsgi but even I m still getting the same error. I typed sudo a2enmod and these are the choices I got dpaste.de/NEIcf It does not contain wsgi. Is it ok to ask this question here or do I need to post a new question?

    – Sam007
    Aug 21 '12 at 17:22



















14














sudo nano /etc/apache2/mods-available/wsgi.load


add the next string to the file



LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so


save, then



sudo a2enmod wsgi
sudo service apache2 restart





share|improve this answer
























  • And how to test this?

    – Sören
    Nov 20 '18 at 23:52











  • not sure there is some test_mode_wsgi script.. just point apache to your wsgi application (check the docs of your framework how to do it), and check if it works..

    – Valentin Kantor
    Nov 21 '18 at 18:18



















0














Try adding the wsgi.load and wsgi.conf from mods-available to mods-enabled manually and then restart Apache.






share|improve this answer































    0














    WSGI Warning



    Official WSGI documentation says:




    When using a Python virtual environment with mod_wsgi, it is very important that it has been created using the same Python installation that mod_wsgi was originally compiled for.




    And then:




    It is not possible to use a Python virtual environment to force mod_wsgi to use a different Python version,
    or even a different Python installation. In other words, Python interpreter is embedded within the mod_wsgi.




    So I would not recommend any of precompiled mod_wsgi binaries from apt but instead you can compile it following the official installation docs.



    The other way



    Use https://gunicorn.org/ and an Apache's



    ProxyPass / http://localhost:8000/


    directive in your virtualhost config.






    share|improve this answer
























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      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%2faskubuntu.com%2fquestions%2f25374%2fhow-do-you-install-mod-wsgi%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      21














      Using sudo a2enmod wsgi should enable the module for you once you reload apache, as most modules don't need the mod_ prefix when enabling them.






      share|improve this answer
























      • i tried sudo a2enmod wsgi but even I m still getting the same error. I typed sudo a2enmod and these are the choices I got dpaste.de/NEIcf It does not contain wsgi. Is it ok to ask this question here or do I need to post a new question?

        – Sam007
        Aug 21 '12 at 17:22
















      21














      Using sudo a2enmod wsgi should enable the module for you once you reload apache, as most modules don't need the mod_ prefix when enabling them.






      share|improve this answer
























      • i tried sudo a2enmod wsgi but even I m still getting the same error. I typed sudo a2enmod and these are the choices I got dpaste.de/NEIcf It does not contain wsgi. Is it ok to ask this question here or do I need to post a new question?

        – Sam007
        Aug 21 '12 at 17:22














      21












      21








      21







      Using sudo a2enmod wsgi should enable the module for you once you reload apache, as most modules don't need the mod_ prefix when enabling them.






      share|improve this answer













      Using sudo a2enmod wsgi should enable the module for you once you reload apache, as most modules don't need the mod_ prefix when enabling them.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Feb 9 '11 at 2:22









      ajmitchajmitch

      13.9k104953




      13.9k104953













      • i tried sudo a2enmod wsgi but even I m still getting the same error. I typed sudo a2enmod and these are the choices I got dpaste.de/NEIcf It does not contain wsgi. Is it ok to ask this question here or do I need to post a new question?

        – Sam007
        Aug 21 '12 at 17:22



















      • i tried sudo a2enmod wsgi but even I m still getting the same error. I typed sudo a2enmod and these are the choices I got dpaste.de/NEIcf It does not contain wsgi. Is it ok to ask this question here or do I need to post a new question?

        – Sam007
        Aug 21 '12 at 17:22

















      i tried sudo a2enmod wsgi but even I m still getting the same error. I typed sudo a2enmod and these are the choices I got dpaste.de/NEIcf It does not contain wsgi. Is it ok to ask this question here or do I need to post a new question?

      – Sam007
      Aug 21 '12 at 17:22





      i tried sudo a2enmod wsgi but even I m still getting the same error. I typed sudo a2enmod and these are the choices I got dpaste.de/NEIcf It does not contain wsgi. Is it ok to ask this question here or do I need to post a new question?

      – Sam007
      Aug 21 '12 at 17:22













      14














      sudo nano /etc/apache2/mods-available/wsgi.load


      add the next string to the file



      LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so


      save, then



      sudo a2enmod wsgi
      sudo service apache2 restart





      share|improve this answer
























      • And how to test this?

        – Sören
        Nov 20 '18 at 23:52











      • not sure there is some test_mode_wsgi script.. just point apache to your wsgi application (check the docs of your framework how to do it), and check if it works..

        – Valentin Kantor
        Nov 21 '18 at 18:18
















      14














      sudo nano /etc/apache2/mods-available/wsgi.load


      add the next string to the file



      LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so


      save, then



      sudo a2enmod wsgi
      sudo service apache2 restart





      share|improve this answer
























      • And how to test this?

        – Sören
        Nov 20 '18 at 23:52











      • not sure there is some test_mode_wsgi script.. just point apache to your wsgi application (check the docs of your framework how to do it), and check if it works..

        – Valentin Kantor
        Nov 21 '18 at 18:18














      14












      14








      14







      sudo nano /etc/apache2/mods-available/wsgi.load


      add the next string to the file



      LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so


      save, then



      sudo a2enmod wsgi
      sudo service apache2 restart





      share|improve this answer













      sudo nano /etc/apache2/mods-available/wsgi.load


      add the next string to the file



      LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so


      save, then



      sudo a2enmod wsgi
      sudo service apache2 restart






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 13 '13 at 0:47









      Valentin KantorValentin Kantor

      31636




      31636













      • And how to test this?

        – Sören
        Nov 20 '18 at 23:52











      • not sure there is some test_mode_wsgi script.. just point apache to your wsgi application (check the docs of your framework how to do it), and check if it works..

        – Valentin Kantor
        Nov 21 '18 at 18:18



















      • And how to test this?

        – Sören
        Nov 20 '18 at 23:52











      • not sure there is some test_mode_wsgi script.. just point apache to your wsgi application (check the docs of your framework how to do it), and check if it works..

        – Valentin Kantor
        Nov 21 '18 at 18:18

















      And how to test this?

      – Sören
      Nov 20 '18 at 23:52





      And how to test this?

      – Sören
      Nov 20 '18 at 23:52













      not sure there is some test_mode_wsgi script.. just point apache to your wsgi application (check the docs of your framework how to do it), and check if it works..

      – Valentin Kantor
      Nov 21 '18 at 18:18





      not sure there is some test_mode_wsgi script.. just point apache to your wsgi application (check the docs of your framework how to do it), and check if it works..

      – Valentin Kantor
      Nov 21 '18 at 18:18











      0














      Try adding the wsgi.load and wsgi.conf from mods-available to mods-enabled manually and then restart Apache.






      share|improve this answer




























        0














        Try adding the wsgi.load and wsgi.conf from mods-available to mods-enabled manually and then restart Apache.






        share|improve this answer


























          0












          0








          0







          Try adding the wsgi.load and wsgi.conf from mods-available to mods-enabled manually and then restart Apache.






          share|improve this answer













          Try adding the wsgi.load and wsgi.conf from mods-available to mods-enabled manually and then restart Apache.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 9 '11 at 2:23









          Thomas BoxleyThomas Boxley

          1,71722343




          1,71722343























              0














              WSGI Warning



              Official WSGI documentation says:




              When using a Python virtual environment with mod_wsgi, it is very important that it has been created using the same Python installation that mod_wsgi was originally compiled for.




              And then:




              It is not possible to use a Python virtual environment to force mod_wsgi to use a different Python version,
              or even a different Python installation. In other words, Python interpreter is embedded within the mod_wsgi.




              So I would not recommend any of precompiled mod_wsgi binaries from apt but instead you can compile it following the official installation docs.



              The other way



              Use https://gunicorn.org/ and an Apache's



              ProxyPass / http://localhost:8000/


              directive in your virtualhost config.






              share|improve this answer




























                0














                WSGI Warning



                Official WSGI documentation says:




                When using a Python virtual environment with mod_wsgi, it is very important that it has been created using the same Python installation that mod_wsgi was originally compiled for.




                And then:




                It is not possible to use a Python virtual environment to force mod_wsgi to use a different Python version,
                or even a different Python installation. In other words, Python interpreter is embedded within the mod_wsgi.




                So I would not recommend any of precompiled mod_wsgi binaries from apt but instead you can compile it following the official installation docs.



                The other way



                Use https://gunicorn.org/ and an Apache's



                ProxyPass / http://localhost:8000/


                directive in your virtualhost config.






                share|improve this answer


























                  0












                  0








                  0







                  WSGI Warning



                  Official WSGI documentation says:




                  When using a Python virtual environment with mod_wsgi, it is very important that it has been created using the same Python installation that mod_wsgi was originally compiled for.




                  And then:




                  It is not possible to use a Python virtual environment to force mod_wsgi to use a different Python version,
                  or even a different Python installation. In other words, Python interpreter is embedded within the mod_wsgi.




                  So I would not recommend any of precompiled mod_wsgi binaries from apt but instead you can compile it following the official installation docs.



                  The other way



                  Use https://gunicorn.org/ and an Apache's



                  ProxyPass / http://localhost:8000/


                  directive in your virtualhost config.






                  share|improve this answer













                  WSGI Warning



                  Official WSGI documentation says:




                  When using a Python virtual environment with mod_wsgi, it is very important that it has been created using the same Python installation that mod_wsgi was originally compiled for.




                  And then:




                  It is not possible to use a Python virtual environment to force mod_wsgi to use a different Python version,
                  or even a different Python installation. In other words, Python interpreter is embedded within the mod_wsgi.




                  So I would not recommend any of precompiled mod_wsgi binaries from apt but instead you can compile it following the official installation docs.



                  The other way



                  Use https://gunicorn.org/ and an Apache's



                  ProxyPass / http://localhost:8000/


                  directive in your virtualhost config.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 28 at 16:04









                  Dmytro GiermanDmytro Gierman

                  11




                  11






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • 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%2faskubuntu.com%2fquestions%2f25374%2fhow-do-you-install-mod-wsgi%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

                      Category:香港粉麵

                      List *all* the tuples!

                      Channel [V]