[modwsgi] Re: Can Two Virtual Hosts Use Same ModWsgi Settings?

2011-05-26 Thread octopusgrabbus
The answer is yes. I simply needed a unique wsgi_handler.py for each
project, like wsgi_amr_handler.py and wsgi_webdev_proj.py each
pointing to their correct respective project paths.

On May 26, 9:29 am, octopusgrabbus old_road_f...@verizon.net wrote:
 Is it bad practice to have two virtual hosts have the same mod_wsgi
 configuration? I have one as shown below. The other is at a different
 port. When I access that port, I get the web site from the
 configuration below.

 Listen 8002
 VirtualHost _default_:8002

 AliasMatch ^/([^/]*\.css) /usr/local/www/documents/media/$1

 Alias /media/ /usr/local/www/documents/media/media/

 Alias /static/ /usr/local/www/documents/media/
 Directory /usr/local/www/documents/media/
 Order deny,allow
 Allow from all
 /Directory

 WSGIScriptAlias / /usr/local/www/wsgi-scripts/wsgi_handler.py
 Directory /usr/local/www/wsgi-scripts
     Order allow,deny
     Allow from all
 /Directory
 #
 ServerAdmin dbad...@town.arlington.ma.us
 

-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.



[modwsgi] Re: mod_wsgi build problems

2011-02-11 Thread octopusgrabbus
I stand corrected. By starting apache manually, I was lulled into a
false sense apache would find the shared library. It did not on
reboot. After doing a make clean and issuing your instructions below
and make install, all is well.
Thanks again.

 This setting will not be used by mod_wsgi when run under Apache as
 Apache doesn't inherit your user environment unless you are actually
 running Apache as yourself.

 In cases where OS default library search path doesn't include
 directory where libpythonX.Y.so is installed, you can at time of
 compiling mod_wsgi go:

   LD_RUN_PATH=/usr/local/lib make

 The LD_RUN_PATH environment variable when set for a compilation, will
 cause that path to be embedded in the resultant .so and so it will now
 how to find the library at runtime automatically.

 Graham


-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.



[modwsgi] Re: mod_wsgi build problems

2011-02-09 Thread octopusgrabbus
Your way is better by embedding the path at configure time. Apache is
working with this. Root's config is set to load this library.

Oh and by the way, thanks for all your help. It was invaluable.

On Feb 8, 9:57 pm, Graham Dumpleton graham.dumple...@gmail.com
wrote:
 On 8 February 2011 05:52, octopusgrabbus old_road_f...@verizon.net wrote:

  Success. Reconfigured Python 2.6.6 with
  --enable-shared
  put in link

  lrwxrwxrwx 1 root root 30 Feb  7 12:01 /usr/local/lib/python2.6/config/
  libpython
  2.6.so - /usr/local/lib/libpython2.6.so

  And loaded the library from .bashrc
  export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

 This setting will not be used by mod_wsgi when run under Apache as
 Apache doesn't inherit your user environment unless you are actually
 running Apache as yourself.

 In cases where OS default library search path doesn't include
 directory where libpythonX.Y.so is installed, you can at time of
 compiling mod_wsgi go:

   LD_RUN_PATH=/usr/local/lib make

 The LD_RUN_PATH environment variable when set for a compilation, will
 cause that path to be embedded in the resultant .so and so it will now
 how to find the library at runtime automatically.

 Graham

  mod_wsgi built fine.

  Thanks for the fine-tuned responses.

  On Feb 7, 11:46 am, octopusgrabbus old_road_f...@verizon.net wrote:
  Graham:

  I rebuilt Python 2.6.6 using the --enable-shared switch on config.
  This produced /usr/local/lib/libpython2.6.so.1.0

  I put a symlink in Python2.6/config libpython2.6.so.1.0 - /usr/local/
  lib/libpython2.6.so.1.0, right along side the static library.

  But when I configure mod_wsgi, I get multiple errors complaining the
  shared library cannot be found.

  /usr/local/bin/python: error while loading shared libraries:
  libpython2.6.so.1.0
  : cannot open shared object file: No such file or directory

  What am I doing wrong?
  tnx
  cmn

  On Feb 7, 10:15 am, Graham Dumpleton graham.dumple...@gmail.com
  wrote:

   Please keep discussion on the mailing list.

   On 8 February 2011 01:58, octopusgrabbus old_road_f...@verizon.net 
   wrote:

Graham:

My answer back to you was not intended to be flip. I looked at the
link you posted this morning, and cannot find the instructions to
rebuild Python on this 64-bit system. I have asked in a number of
places, including the Python forums. One of the answers I got back was
very flip, saying use twisted. I've really tried to get an answer or
re-installing Python and am running into a wall.

   Since your Python is installed under /usr/local/ and not /usr then it
   presumably was installed from source code. Look in the file:

     /usr/local/lib/python2.6/config/Makefile

   and look for the value of the CONFIG_VARS variable. For example, of my
   MacOS X system (different to what you are using), it has:

   CONFIG_ARGS=     '--prefix=/usr' '--mandir=/usr/share/man'
   '--infodir=/usr/share/info' '--disable-dependency-tracking'
   '--enable-ipv6' '--with-threads'
   '--enable-framework=/System/Library/Frameworks'
   '--enable-toolbox-glue' '--enable-dtrace' '--with-system-ffi'
   '--with-gcc=gcc-4.2' 'CC=gcc-4.2' 'CXX=g++-4.2' 'CFLAGS=-g -Os -pipe
   -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd
   -I/usr/include/ffi -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall
   -Wstrict-prototypes -Wshorten-64-to-32' 'LDFLAGS=-Wl,-F.'

   Thos arguments were what was originally supplied to the 'configure'
   script of Python when it was built from source code.

   Post what you find for those in your installation.

   What you would then do to duplicate same build, is to download Python
   source code tar ball fromwww.python.org. You go into the Python
   source tree after you unpack the tar ball. Normally, you would read
   the README which explains how to install Python from source code. The
   simple way in your case though is to just use the same options for
   'configure' as CONFIG_VARS lists for YOUR existing installation,
   except that you MUST also add the '--enable-shared' option as well.
   You might also want to change the value of the '--prefix' option so it
   installs into different location in overwriting the existing Python
   installation would be a problem.

   Check the README in the Python source code for further details on how
   to install it.

   Graham

Thanks.
cmn

On Feb 7, 9:30 am, Graham Dumpleton graham.dumple...@gmail.com
wrote:
Read:

 http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bi...

Solution is to use a Python installation that provides a shared 
library.

Graham

On 5 February 2011 03:06, octopusgrabbus octopusgrab...@gmail.com 
wrote:

 I've run into a build problem, and am wondering about the best
 solution for fixing it. This is an RHEL 5 WS system.

 Here is the error from running make. ./configure completed fine.

 /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
 mod_wsgi.la

[modwsgi] Re: mod_wsgi build problems

2011-02-07 Thread octopusgrabbus
Made that error go away by adding the location of the shared library
to the load library path.

On Feb 7, 11:46 am, octopusgrabbus old_road_f...@verizon.net wrote:
 Graham:

 I rebuilt Python 2.6.6 using the --enable-shared switch on config.
 This produced /usr/local/lib/libpython2.6.so.1.0

 I put a symlink in Python2.6/config libpython2.6.so.1.0 - /usr/local/
 lib/libpython2.6.so.1.0, right along side the static library.

 But when I configure mod_wsgi, I get multiple errors complaining the
 shared library cannot be found.

 /usr/local/bin/python: error while loading shared libraries:
 libpython2.6.so.1.0
 : cannot open shared object file: No such file or directory

 What am I doing wrong?
 tnx
 cmn

 On Feb 7, 10:15 am, Graham Dumpleton graham.dumple...@gmail.com
 wrote:

  Please keep discussion on the mailing list.

  On 8 February 2011 01:58, octopusgrabbus old_road_f...@verizon.net wrote:

   Graham:

   My answer back to you was not intended to be flip. I looked at the
   link you posted this morning, and cannot find the instructions to
   rebuild Python on this 64-bit system. I have asked in a number of
   places, including the Python forums. One of the answers I got back was
   very flip, saying use twisted. I've really tried to get an answer or
   re-installing Python and am running into a wall.

  Since your Python is installed under /usr/local/ and not /usr then it
  presumably was installed from source code. Look in the file:

    /usr/local/lib/python2.6/config/Makefile

  and look for the value of the CONFIG_VARS variable. For example, of my
  MacOS X system (different to what you are using), it has:

  CONFIG_ARGS=     '--prefix=/usr' '--mandir=/usr/share/man'
  '--infodir=/usr/share/info' '--disable-dependency-tracking'
  '--enable-ipv6' '--with-threads'
  '--enable-framework=/System/Library/Frameworks'
  '--enable-toolbox-glue' '--enable-dtrace' '--with-system-ffi'
  '--with-gcc=gcc-4.2' 'CC=gcc-4.2' 'CXX=g++-4.2' 'CFLAGS=-g -Os -pipe
  -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd
  -I/usr/include/ffi -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall
  -Wstrict-prototypes -Wshorten-64-to-32' 'LDFLAGS=-Wl,-F.'

  Thos arguments were what was originally supplied to the 'configure'
  script of Python when it was built from source code.

  Post what you find for those in your installation.

  What you would then do to duplicate same build, is to download Python
  source code tar ball fromwww.python.org. You go into the Python
  source tree after you unpack the tar ball. Normally, you would read
  the README which explains how to install Python from source code. The
  simple way in your case though is to just use the same options for
  'configure' as CONFIG_VARS lists for YOUR existing installation,
  except that you MUST also add the '--enable-shared' option as well.
  You might also want to change the value of the '--prefix' option so it
  installs into different location in overwriting the existing Python
  installation would be a problem.

  Check the README in the Python source code for further details on how
  to install it.

  Graham

   Thanks.
   cmn

   On Feb 7, 9:30 am, Graham Dumpleton graham.dumple...@gmail.com
   wrote:
   Read:

    http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bi...

   Solution is to use a Python installation that provides a shared library.

   Graham

   On 5 February 2011 03:06, octopusgrabbus octopusgrab...@gmail.com 
   wrote:

I've run into a build problem, and am wondering about the best
solution for fixing it. This is an RHEL 5 WS system.

Here is the error from running make. ./configure completed fine.

/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
mod_wsgi.la  -rpath /
usr/lib64/httpd/modules -module -avoid-version    mod_wsgi.lo -L/usr/
local/lib -
L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
/usr/bin/ld: /usr/local/lib/libpython2.6.a(node.o): relocation
R_X86_64_32 again
st `a local symbol' can not be used when making a shared object;
recompile with
-fPIC
/usr/local/lib/libpython2.6.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536

Your advice would be very much appreciated. I have mod_wsgi running on
Ubuntu, and I've got to say the operation over mod_python is well
worth the work. Thank you.

--
You received this message because you are subscribed to the Google 
Groups modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email

[modwsgi] Re: mod_wsgi build problems

2011-02-07 Thread octopusgrabbus
Success. Reconfigured Python 2.6.6 with
--enable-shared
put in link

lrwxrwxrwx 1 root root 30 Feb  7 12:01 /usr/local/lib/python2.6/config/
libpython
2.6.so - /usr/local/lib/libpython2.6.so

And loaded the library from .bashrc
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

mod_wsgi built fine.

Thanks for the fine-tuned responses.

On Feb 7, 11:46 am, octopusgrabbus old_road_f...@verizon.net wrote:
 Graham:

 I rebuilt Python 2.6.6 using the --enable-shared switch on config.
 This produced /usr/local/lib/libpython2.6.so.1.0

 I put a symlink in Python2.6/config libpython2.6.so.1.0 - /usr/local/
 lib/libpython2.6.so.1.0, right along side the static library.

 But when I configure mod_wsgi, I get multiple errors complaining the
 shared library cannot be found.

 /usr/local/bin/python: error while loading shared libraries:
 libpython2.6.so.1.0
 : cannot open shared object file: No such file or directory

 What am I doing wrong?
 tnx
 cmn

 On Feb 7, 10:15 am, Graham Dumpleton graham.dumple...@gmail.com
 wrote:

  Please keep discussion on the mailing list.

  On 8 February 2011 01:58, octopusgrabbus old_road_f...@verizon.net wrote:

   Graham:

   My answer back to you was not intended to be flip. I looked at the
   link you posted this morning, and cannot find the instructions to
   rebuild Python on this 64-bit system. I have asked in a number of
   places, including the Python forums. One of the answers I got back was
   very flip, saying use twisted. I've really tried to get an answer or
   re-installing Python and am running into a wall.

  Since your Python is installed under /usr/local/ and not /usr then it
  presumably was installed from source code. Look in the file:

    /usr/local/lib/python2.6/config/Makefile

  and look for the value of the CONFIG_VARS variable. For example, of my
  MacOS X system (different to what you are using), it has:

  CONFIG_ARGS=     '--prefix=/usr' '--mandir=/usr/share/man'
  '--infodir=/usr/share/info' '--disable-dependency-tracking'
  '--enable-ipv6' '--with-threads'
  '--enable-framework=/System/Library/Frameworks'
  '--enable-toolbox-glue' '--enable-dtrace' '--with-system-ffi'
  '--with-gcc=gcc-4.2' 'CC=gcc-4.2' 'CXX=g++-4.2' 'CFLAGS=-g -Os -pipe
  -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd
  -I/usr/include/ffi -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall
  -Wstrict-prototypes -Wshorten-64-to-32' 'LDFLAGS=-Wl,-F.'

  Thos arguments were what was originally supplied to the 'configure'
  script of Python when it was built from source code.

  Post what you find for those in your installation.

  What you would then do to duplicate same build, is to download Python
  source code tar ball fromwww.python.org. You go into the Python
  source tree after you unpack the tar ball. Normally, you would read
  the README which explains how to install Python from source code. The
  simple way in your case though is to just use the same options for
  'configure' as CONFIG_VARS lists for YOUR existing installation,
  except that you MUST also add the '--enable-shared' option as well.
  You might also want to change the value of the '--prefix' option so it
  installs into different location in overwriting the existing Python
  installation would be a problem.

  Check the README in the Python source code for further details on how
  to install it.

  Graham

   Thanks.
   cmn

   On Feb 7, 9:30 am, Graham Dumpleton graham.dumple...@gmail.com
   wrote:
   Read:

    http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bi...

   Solution is to use a Python installation that provides a shared library.

   Graham

   On 5 February 2011 03:06, octopusgrabbus octopusgrab...@gmail.com 
   wrote:

I've run into a build problem, and am wondering about the best
solution for fixing it. This is an RHEL 5 WS system.

Here is the error from running make. ./configure completed fine.

/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
mod_wsgi.la  -rpath /
usr/lib64/httpd/modules -module -avoid-version    mod_wsgi.lo -L/usr/
local/lib -
L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
/usr/bin/ld: /usr/local/lib/libpython2.6.a(node.o): relocation
R_X86_64_32 again
st `a local symbol' can not be used when making a shared object;
recompile with
-fPIC
/usr/local/lib/libpython2.6.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536

Your advice would be very much appreciated. I have mod_wsgi running on
Ubuntu, and I've got to say the operation over mod_python is well
worth the work. Thank you.

--
You received this message because you are subscribed to the Google 
Groups modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp

[modwsgi] mod_wsgi build problems

2011-02-04 Thread octopusgrabbus
I've run into a build problem, and am wondering about the best
solution for fixing it. This is an RHEL 5 WS system.

Here is the error from running make. ./configure completed fine.

/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
mod_wsgi.la  -rpath /
usr/lib64/httpd/modules -module -avoid-versionmod_wsgi.lo -L/usr/
local/lib -
L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
/usr/bin/ld: /usr/local/lib/libpython2.6.a(node.o): relocation
R_X86_64_32 again
st `a local symbol' can not be used when making a shared object;
recompile with
-fPIC
/usr/local/lib/libpython2.6.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536

Your advice would be very much appreciated. I have mod_wsgi running on
Ubuntu, and I've got to say the operation over mod_python is well
worth the work. Thank you.



-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.



[modwsgi] Re: mod_wsgi configuration problems

2011-01-26 Thread octopusgrabbus
I've issued this command:

dbadmin@steamboy:~$ sudo apt-get install libapache2-mod-wsgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-wsgi is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Then, I've issued this command and gotten this error:

dbadmin@steamboy:~$ sudo a2enmod mod-wsgi
ERROR: Module mod-wsgi does not exist!

Is there a step I'm missing?

On Jan 25, 5:07 pm, Graham Dumpleton graham.dumple...@gmail.com
wrote:
 On 26 January 2011 04:48, octopusgrabbus octopusgrab...@gmail.com wrote:

  I am working my way through various apache error log messages trying
  to move my application from mod_python to mod_wsgi. Currently
  WSGIScriptAlias can't be loaded, and I am trying to understand what
  corrections need to be made for it to load.

 Do you mean that Apache will not even recognise the WSGIScriptAlias directive?

 You are going to have to be more specific about the error message you
 see in the browser and in the Apache error log files.

 You are also possibly missing some configuration. I really recommend you 
 watch:

  http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_...

 That does start out though on the assumption that you have actually
 enabled the mod_wsgi module in Apache first though.

 You can check whether mod_wsgi is loaded by using '-M' option to
 Apache on command line:

  http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Apache...

 Graham

  Here is my apache configuration for Django and mod_wsgi

  # Virtual hosts
  #

  Listen 9090
  VirtualHost _default_:9090
  WSGIScriptAlias / /home/amr/django/django.wsgi
  Alias /media /home/amr/django/amr/media
  /VirtualHost

  Here is django.wsgi

  import os
  import sys
  path = '/home/amr/django/amr'
  if path not in sys.path:
     sys.path.append(path)

  os.environ['DJANGO_SETTINGS_MODULE'] = 'amr.settings'

  import django.core.handlers.wsgi
  application = django.core.handlers.wsgi.WSGIHandler()

  --
  You received this message because you are subscribed to the Google Groups 
  modwsgi group.
  To post to this group, send email to modwsgi@googlegroups.com.
  To unsubscribe from this group, send email to 
  modwsgi+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.



[modwsgi] Re: mod_wsgi configuration problems

2011-01-26 Thread octopusgrabbus
mod_wsgi does appear to be installed

/usr/lib/apache2/modules/mod_wsgi.so
- mod_wsgi.so-2.6


On Jan 26, 9:17 am, octopusgrabbus octopusgrab...@gmail.com wrote:
 I've issued this command:

 dbadmin@steamboy:~$ sudo apt-get install libapache2-mod-wsgi
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 libapache2-mod-wsgi is already the newest version.
 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

 Then, I've issued this command and gotten this error:

 dbadmin@steamboy:~$ sudo a2enmod mod-wsgi
 ERROR: Module mod-wsgi does not exist!

 Is there a step I'm missing?

 On Jan 25, 5:07 pm, Graham Dumpleton graham.dumple...@gmail.com
 wrote:

  On 26 January 2011 04:48, octopusgrabbus octopusgrab...@gmail.com wrote:

   I am working my way through various apache error log messages trying
   to move my application from mod_python to mod_wsgi. Currently
   WSGIScriptAlias can't be loaded, and I am trying to understand what
   corrections need to be made for it to load.

  Do you mean that Apache will not even recognise the WSGIScriptAlias 
  directive?

  You are going to have to be more specific about the error message you
  see in the browser and in the Apache error log files.

  You are also possibly missing some configuration. I really recommend you 
  watch:

   http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_...

  That does start out though on the assumption that you have actually
  enabled the mod_wsgi module in Apache first though.

  You can check whether mod_wsgi is loaded by using '-M' option to
  Apache on command line:

   http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Apache...

  Graham

   Here is my apache configuration for Django and mod_wsgi

   # Virtual hosts
   #

   Listen 9090
   VirtualHost _default_:9090
   WSGIScriptAlias / /home/amr/django/django.wsgi
   Alias /media /home/amr/django/amr/media
   /VirtualHost

   Here is django.wsgi

   import os
   import sys
   path = '/home/amr/django/amr'
   if path not in sys.path:
      sys.path.append(path)

   os.environ['DJANGO_SETTINGS_MODULE'] = 'amr.settings'

   import django.core.handlers.wsgi
   application = django.core.handlers.wsgi.WSGIHandler()

   --
   You received this message because you are subscribed to the Google Groups 
   modwsgi group.
   To post to this group, send email to modwsgi@googlegroups.com.
   To unsubscribe from this group, send email to 
   modwsgi+unsubscr...@googlegroups.com.
   For more options, visit this group 
   athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.



[modwsgi] Re: mod_wsgi configuration problems

2011-01-26 Thread octopusgrabbus
mod_wsgi now loaded. from apache2ctl -M
 wsgi_module (shared)

Here is an excerpt of the apache error log
[Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1] Traceback (most
recent cal
l last):
[Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1]   File /home/
amr/django/d
jango.wsgi, line 9, in module
[Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1] import
django.core.han
dlers.wsgi
[Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1] ImportError: No
module nam
ed django.core.handlers.wsgi
[Wed Jan 26 09:57:58 2011] [error] [client 127.0.0.1] mod_wsgi
(pid=4048): Targe
t WSGI script '/home/amr/django/django.wsgi' cannot be loaded as
Python module.
[Wed Jan 26 09:57:58 2011] [error] [client 127.0.0.1] mod_wsgi
(pid=4048): Excep
tion occurred processing WSGI script '/home/amr/django/django.wsgi'.


On Jan 26, 9:37 am, octopusgrabbus octopusgrab...@gmail.com wrote:
 mod_wsgi does appear to be installed

 /usr/lib/apache2/modules/mod_wsgi.so
 - mod_wsgi.so-2.6

 On Jan 26, 9:17 am, octopusgrabbus octopusgrab...@gmail.com wrote:

  I've issued this command:

  dbadmin@steamboy:~$ sudo apt-get install libapache2-mod-wsgi
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  libapache2-mod-wsgi is already the newest version.
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  Then, I've issued this command and gotten this error:

  dbadmin@steamboy:~$ sudo a2enmod mod-wsgi
  ERROR: Module mod-wsgi does not exist!

  Is there a step I'm missing?

  On Jan 25, 5:07 pm, Graham Dumpleton graham.dumple...@gmail.com
  wrote:

   On 26 January 2011 04:48, octopusgrabbus octopusgrab...@gmail.com wrote:

I am working my way through various apache error log messages trying
to move my application from mod_python to mod_wsgi. Currently
WSGIScriptAlias can't be loaded, and I am trying to understand what
corrections need to be made for it to load.

   Do you mean that Apache will not even recognise the WSGIScriptAlias 
   directive?

   You are going to have to be more specific about the error message you
   see in the browser and in the Apache error log files.

   You are also possibly missing some configuration. I really recommend you 
   watch:

    http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_...

   That does start out though on the assumption that you have actually
   enabled the mod_wsgi module in Apache first though.

   You can check whether mod_wsgi is loaded by using '-M' option to
   Apache on command line:

    http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Apache...

   Graham

Here is my apache configuration for Django and mod_wsgi

# Virtual hosts
#

Listen 9090
VirtualHost _default_:9090
WSGIScriptAlias / /home/amr/django/django.wsgi
Alias /media /home/amr/django/amr/media
/VirtualHost

Here is django.wsgi

import os
import sys
path = '/home/amr/django/amr'
if path not in sys.path:
   sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'amr.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

--
You received this message because you are subscribed to the Google 
Groups modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.



[modwsgi] Re: mod_wsgi configuration problems

2011-01-26 Thread octopusgrabbus
Thanks. I'll re-install Django then.

On Jan 26, 2:56 pm, Graham Dumpleton graham.dumple...@gmail.com
wrote:
 On 27 January 2011 02:02, octopusgrabbus octopusgrab...@gmail.com wrote:



  mod_wsgi now loaded. from apache2ctl -M
   wsgi_module (shared)

  Here is an excerpt of the apache error log
  [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1] Traceback (most
  recent cal
  l last):
  [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1]   File /home/
  amr/django/d
  jango.wsgi, line 9, in module
  [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1]     import
  django.core.han
  dlers.wsgi
  [Wed Jan 26 09:57:55 2011] [error] [client 127.0.0.1] ImportError: No
  module nam
  ed django.core.handlers.wsgi

 You don't have Django installed. Or you have multiple Python
 installations and Django is installed for different Python
 installation than mod_wsgi was compiled for and is using. Or you
 installed Django into a virtualenv or local directory and didn't say
 in your WSGI script file where that was.

 So, not a problem with mod_wsgi itself, just how you are setting up
 your WSGI script file and/or environment.

 Graham

  [Wed Jan 26 09:57:58 2011] [error] [client 127.0.0.1] mod_wsgi
  (pid=4048): Targe
  t WSGI script '/home/amr/django/django.wsgi' cannot be loaded as
  Python module.
  [Wed Jan 26 09:57:58 2011] [error] [client 127.0.0.1] mod_wsgi
  (pid=4048): Excep
  tion occurred processing WSGI script '/home/amr/django/django.wsgi'.

  On Jan 26, 9:37 am, octopusgrabbus octopusgrab...@gmail.com wrote:
  mod_wsgi does appear to be installed

  /usr/lib/apache2/modules/mod_wsgi.so
  - mod_wsgi.so-2.6

  On Jan 26, 9:17 am, octopusgrabbus octopusgrab...@gmail.com wrote:

   I've issued this command:

   dbadmin@steamboy:~$ sudo apt-get install libapache2-mod-wsgi
   Reading package lists... Done
   Building dependency tree
   Reading state information... Done
   libapache2-mod-wsgi is already the newest version.
   0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

   Then, I've issued this command and gotten this error:

   dbadmin@steamboy:~$ sudo a2enmod mod-wsgi
   ERROR: Module mod-wsgi does not exist!

   Is there a step I'm missing?

   On Jan 25, 5:07 pm, Graham Dumpleton graham.dumple...@gmail.com
   wrote:

On 26 January 2011 04:48, octopusgrabbus octopusgrab...@gmail.com 
wrote:

 I am working my way through various apache error log messages trying
 to move my application from mod_python to mod_wsgi. Currently
 WSGIScriptAlias can't be loaded, and I am trying to understand what
 corrections need to be made for it to load.

Do you mean that Apache will not even recognise the WSGIScriptAlias 
directive?

You are going to have to be more specific about the error message you
see in the browser and in the Apache error log files.

You are also possibly missing some configuration. I really recommend 
you watch:

 http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_...

That does start out though on the assumption that you have actually
enabled the mod_wsgi module in Apache first though.

You can check whether mod_wsgi is loaded by using '-M' option to
Apache on command line:

 http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Apache...

Graham

 Here is my apache configuration for Django and mod_wsgi

 # Virtual hosts
 #

 Listen 9090
 VirtualHost _default_:9090
 WSGIScriptAlias / /home/amr/django/django.wsgi
 Alias /media /home/amr/django/amr/media
 /VirtualHost

 Here is django.wsgi

 import os
 import sys
 path = '/home/amr/django/amr'
 if path not in sys.path:
    sys.path.append(path)

 os.environ['DJANGO_SETTINGS_MODULE'] = 'amr.settings'

 import django.core.handlers.wsgi
 application = django.core.handlers.wsgi.WSGIHandler()

 --
 You received this message because you are subscribed to the Google 
 Groups modwsgi group.
 To post to this group, send email to modwsgi@googlegroups.com.
 To unsubscribe from this group, send email to 
 modwsgi+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/modwsgi?hl=en.

  --
  You received this message because you are subscribed to the Google Groups 
  modwsgi group.
  To post to this group, send email to modwsgi@googlegroups.com.
  To unsubscribe from this group, send email to 
  modwsgi+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.



[modwsgi] mod_wsgi configuration problems

2011-01-25 Thread octopusgrabbus
I am working my way through various apache error log messages trying
to move my application from mod_python to mod_wsgi. Currently
WSGIScriptAlias can't be loaded, and I am trying to understand what
corrections need to be made for it to load.

Here is my apache configuration for Django and mod_wsgi

# Virtual hosts
#

Listen 9090
VirtualHost _default_:9090
WSGIScriptAlias / /home/amr/django/django.wsgi
Alias /media /home/amr/django/amr/media
/VirtualHost

Here is django.wsgi

import os
import sys
path = '/home/amr/django/amr'
if path not in sys.path:
sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'amr.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

-- 
You received this message because you are subscribed to the Google Groups 
modwsgi group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.