mod_wsgi cannot be loaded as Python module http 500 error

Multi tool use
Multi tool use












0















I am trying to deploy mod_wsgi with apache to run a django application but I am getting an error: 500 internal server error.



This is what apache log shows:



[Sun Dec 30 12:46:44.179450 2018] [mpm_event:notice] [pid 21350:tid 139933131320256] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
[Sun Dec 30 12:46:44.179649 2018] [core:notice] [pid 21350:tid 139933131320256] AH00094: Command line: '/usr/sbin/apache2'
[Sun Dec 30 12:46:45.681614 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Target WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py' cannot be loaded as Py$[Sun Dec 30 12:46:45.687031 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Exception occurred processing WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py'.


And this is my virtual host conf:



<VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /static /home/betourne/tonnerrekalaraclub/static
<Directory /home/betourne/tonnerrekalaraclub/static>
Require all granted
</Directory>

Alias /media /home/betourne/tonnerrekalaraclub/media
<Directory /home/betourne/tonnerrekalaraclub/media>
Require all granted
</Directory>

WSGIScriptAlias / /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py
WSGIDaemonProcess django_app python-path=/home/betourne/tonnerrekalaraclub python-home=/home/betourne/tonnerrekalaraclub/venv
WSGIProcessGroup django_app
<Directory /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub>
<Files wsgi.py>
Require all granted
</Files>
</Directory>

</VirtualHost>


I'm not sure what else to try, I've been looking for a solution for 2 days now, considering each thread on the forum.



WWW-DATA has every rights to access directory, I checked that there's no mispelling...



I am on Ubuntu 18.04.1










share|improve this question





























    0















    I am trying to deploy mod_wsgi with apache to run a django application but I am getting an error: 500 internal server error.



    This is what apache log shows:



    [Sun Dec 30 12:46:44.179450 2018] [mpm_event:notice] [pid 21350:tid 139933131320256] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
    [Sun Dec 30 12:46:44.179649 2018] [core:notice] [pid 21350:tid 139933131320256] AH00094: Command line: '/usr/sbin/apache2'
    [Sun Dec 30 12:46:45.681614 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Target WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py' cannot be loaded as Py$[Sun Dec 30 12:46:45.687031 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Exception occurred processing WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py'.


    And this is my virtual host conf:



    <VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /static /home/betourne/tonnerrekalaraclub/static
    <Directory /home/betourne/tonnerrekalaraclub/static>
    Require all granted
    </Directory>

    Alias /media /home/betourne/tonnerrekalaraclub/media
    <Directory /home/betourne/tonnerrekalaraclub/media>
    Require all granted
    </Directory>

    WSGIScriptAlias / /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py
    WSGIDaemonProcess django_app python-path=/home/betourne/tonnerrekalaraclub python-home=/home/betourne/tonnerrekalaraclub/venv
    WSGIProcessGroup django_app
    <Directory /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub>
    <Files wsgi.py>
    Require all granted
    </Files>
    </Directory>

    </VirtualHost>


    I'm not sure what else to try, I've been looking for a solution for 2 days now, considering each thread on the forum.



    WWW-DATA has every rights to access directory, I checked that there's no mispelling...



    I am on Ubuntu 18.04.1










    share|improve this question



























      0












      0








      0








      I am trying to deploy mod_wsgi with apache to run a django application but I am getting an error: 500 internal server error.



      This is what apache log shows:



      [Sun Dec 30 12:46:44.179450 2018] [mpm_event:notice] [pid 21350:tid 139933131320256] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
      [Sun Dec 30 12:46:44.179649 2018] [core:notice] [pid 21350:tid 139933131320256] AH00094: Command line: '/usr/sbin/apache2'
      [Sun Dec 30 12:46:45.681614 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Target WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py' cannot be loaded as Py$[Sun Dec 30 12:46:45.687031 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Exception occurred processing WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py'.


      And this is my virtual host conf:



      <VirtualHost *:80>

      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/html

      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined

      Alias /static /home/betourne/tonnerrekalaraclub/static
      <Directory /home/betourne/tonnerrekalaraclub/static>
      Require all granted
      </Directory>

      Alias /media /home/betourne/tonnerrekalaraclub/media
      <Directory /home/betourne/tonnerrekalaraclub/media>
      Require all granted
      </Directory>

      WSGIScriptAlias / /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py
      WSGIDaemonProcess django_app python-path=/home/betourne/tonnerrekalaraclub python-home=/home/betourne/tonnerrekalaraclub/venv
      WSGIProcessGroup django_app
      <Directory /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub>
      <Files wsgi.py>
      Require all granted
      </Files>
      </Directory>

      </VirtualHost>


      I'm not sure what else to try, I've been looking for a solution for 2 days now, considering each thread on the forum.



      WWW-DATA has every rights to access directory, I checked that there's no mispelling...



      I am on Ubuntu 18.04.1










      share|improve this question
















      I am trying to deploy mod_wsgi with apache to run a django application but I am getting an error: 500 internal server error.



      This is what apache log shows:



      [Sun Dec 30 12:46:44.179450 2018] [mpm_event:notice] [pid 21350:tid 139933131320256] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
      [Sun Dec 30 12:46:44.179649 2018] [core:notice] [pid 21350:tid 139933131320256] AH00094: Command line: '/usr/sbin/apache2'
      [Sun Dec 30 12:46:45.681614 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Target WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py' cannot be loaded as Py$[Sun Dec 30 12:46:45.687031 2018] [wsgi:error] [pid 21353:tid 139933017503488] [remote 109.8.128.207:52109] mod_wsgi (pid=21353): Exception occurred processing WSGI script '/home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py'.


      And this is my virtual host conf:



      <VirtualHost *:80>

      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/html

      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined

      Alias /static /home/betourne/tonnerrekalaraclub/static
      <Directory /home/betourne/tonnerrekalaraclub/static>
      Require all granted
      </Directory>

      Alias /media /home/betourne/tonnerrekalaraclub/media
      <Directory /home/betourne/tonnerrekalaraclub/media>
      Require all granted
      </Directory>

      WSGIScriptAlias / /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub/wsgi.py
      WSGIDaemonProcess django_app python-path=/home/betourne/tonnerrekalaraclub python-home=/home/betourne/tonnerrekalaraclub/venv
      WSGIProcessGroup django_app
      <Directory /home/betourne/tonnerrekalaraclub/tonnerrekalaraclub>
      <Files wsgi.py>
      Require all granted
      </Files>
      </Directory>

      </VirtualHost>


      I'm not sure what else to try, I've been looking for a solution for 2 days now, considering each thread on the forum.



      WWW-DATA has every rights to access directory, I checked that there's no mispelling...



      I am on Ubuntu 18.04.1







      django apache ubuntu wsgi






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 31 '18 at 1:12









      bunbun

      2,03532447




      2,03532447










      asked Dec 30 '18 at 12:02









      Mattis BETOURNEMattis BETOURNE

      11




      11
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          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%2fstackoverflow.com%2fquestions%2f53977415%2fmod-wsgi-cannot-be-loaded-as-python-module-http-500-error%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
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • 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%2fstackoverflow.com%2fquestions%2f53977415%2fmod-wsgi-cannot-be-loaded-as-python-module-http-500-error%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







          Cg4UT3wCs5obbZSd ixt0 xiD,K2 IVqHVpj3VCEo,2Y2U,XJ76y,aZxpvq
          v8rbf5n,IgJ33BSF5 XCmBjnSGZVGB77BLxlDQ 4,GxXEtngoPuEd8Cd,s,37z43L,4q8,c4

          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas