Installing mapfish server with wsgi_mod - what is a2enmod?

View: New views
5 Messages — Rating Filter:   Alert me  

Installing mapfish server with wsgi_mod - what is a2enmod?

by asleB :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I am installing on OS X 10.5.8 MapFish server according to http://trac.mapfish.org/trac/mapfish/wiki/HowToMapFishServerApache and it seems I am doing something wrong because i get "500 internal server error". Now I am trying to find out what is wrong. On the howto page it says this:

Now create a file named wsgi.load in the Apache modules directory (/etc/apache2/mods-available) with this content:

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

You can now enable wsgi into Apache (a2enmod wsgi) and restart Apache.

So the questions are:
- I do not have "mods-available" on Apache for OS X. So I put this in httpd.conf which should do the same as a load file (?)
<IfModule !mod_wsgi.c>
   LoadModule wsgi_module libexec/apache2/mod_wsgi.so
</IfModule>


- I am not sure what it means to "enable wsgi_module". I cannot find the command "a2enmod".

I have done the other steps on the howto page but get this error:

[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi (pid=90674): Target WSGI script '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi' cannot be loaded as Python module.
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi (pid=90674): Exception occurred processing WSGI script '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi'.
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] Traceback (most recent call last):
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File "/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi", line 11, in <module>
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     fileConfig('/Library/WebServer/mapfishserver/MapFishApp/developement.ini')
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py", line 76, in fileConfig
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     formatters = _create_formatters(cp)
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py", line 108, in _create_formatters
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     flist = cp.get("formatters", "keys")
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 511, in get
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     raise NoSectionError(section)
[Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] NoSectionError: No section: 'formatters'



/asle

_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users

Re: Installing mapfish server with wsgi_mod - what is a2enmod?

by Eric Lemoine-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 9, 2009 at 3:56 PM, Asle Benoni <asle.benoni@...> wrote:

> Hello,
> I am installing on OS X 10.5.8 MapFish server according to
> http://trac.mapfish.org/trac/mapfish/wiki/HowToMapFishServerApache and it
> seems I am doing something wrong because i get "500 internal server error".
> Now I am trying to find out what is wrong. On the howto page it says this:
>
> Now create a file named wsgi.load in the Apache modules directory
> (/etc/apache2/mods-available) with this content:
>
> LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
>
> You can now enable wsgi into Apache (a2enmod wsgi) and restart Apache.
>
> So the questions are:
> - I do not have "mods-available" on Apache for OS X. So I put this in
> httpd.conf which should do the same as a load file (?)
> <IfModule !mod_wsgi.c>
>    LoadModule wsgi_module libexec/apache2/mod_wsgi.so
> </IfModule>
>
> - I am not sure what it means to "enable wsgi_module". I cannot find the
> command "a2enmod".
>
> I have done the other steps on the howto page but get this error:
>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Target WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi' cannot be
> loaded as Python module.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Exception occurred processing WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi'.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] Traceback (most
> recent call last):
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi", line 11, in
> <module>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]
> fileConfig('/Library/WebServer/mapfishserver/MapFishApp/developement.ini')
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 76, in fileConfig
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     formatters =
> _create_formatters(cp)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 108, in _create_formatters
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     flist =
> cp.get("formatters", "keys")
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py",
> line 511, in get
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     raise
> NoSectionError(section)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] NoSectionError: No
> section: 'formatters'

Hi Asle,

Can you check you have a "formatters" section in your development.ini
file? (Feel also free to post your entire development.ini).

Thanks,
--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@...
http://www.camptocamp.com
_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users

Re: Installing mapfish server with wsgi_mod - what is a2enmod?

by asleB :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, here is my development.ini

Now I think that mod_wsgi works correctly. I tried to make a testfile myapp.wsgi  like here and put it in a virtualhost.
http://wiki.pylonshq.com/display/pylonscookbook/mod_wsgi+and+workingenv.py#check-mod-wsgi-is-installed-correctly

So the problem I think is my config and not the apache module.

# MapFishApp - Pylons development environment configuration                 
                                                                                                                                                                                                
#                                                                                                                                                                                                                                                                           
# The %(here)s variable will be replaced with the parent directory of this file                                                                                                                                                                                             
#                                                                                                                                                                                                                                                                           
[DEFAULT]
debug = true
# Uncomment and replace with the address which should receive any error reports                                                                                                                                                                                             
#email_to = you@...                                                                                                                                                                                                                                              
smtp_server = localhost
error_email_from = paste@localhost

[server:main]
use = egg:Paste#http                                                                                                                                                                                                                                                        
host = 85.196.85.67
port = 5000

[app:main]
use = egg:MapFishApp
full_stack = true
static_files = true

cache_dir = %(here)s/data
beaker.session.key = mapfishapp
beaker.session.secret = somesecret

# If you'd like to fine-tune the individual locations of the cache data dirs                                                                                                                                                                                                
# for the Cache data, or the Session saves, un-comment the desired settings                                                                                                                                                                                                 
# here:                                                                                                                                                                                                                                                                     
#beaker.cache.data_dir = %(here)s/data/cache                                                                                                                                                                                                                                
#beaker.session.data_dir = %(here)s/data/sessions                                                                                                                                                                                                                           

# SQLAlchemy database URL                                                                                                                                                                                                                                                   
sqlalchemy.url = postgres://user:passw@localhost:5432/geodb
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*                                                                                                                                                                                                 
# Debug mode will enable the interactive debugging tool, allowing ANYONE to                                                                                                                                                                                                 
# execute malicious code after an exception is raised.                                                                                                                                                                                                                      
#set debug = false                                                                                                                                                                                                                                                          

# Logging configuration                                                                                                                                                                                                                                                     
[loggers]
keys = root, routes, mapfishapp, sqlalchemy

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console
[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.                                                                                                                                                                                                             

[logger_mapfishapp]
level = DEBUG
handlers =
qualname = mapfishapp

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.                                                                                                                                                                                                                                          
# "level = DEBUG" logs SQL queries and results.                                                                                                                                                                                                                             
# "level = WARN" logs neither.  (Recommended for production systems.)   

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S


2009/11/10 Eric Lemoine <eric.lemoine@...>
On Mon, Nov 9, 2009 at 3:56 PM, Asle Benoni <asle.benoni@...> wrote:
> Hello,
> I am installing on OS X 10.5.8 MapFish server according to
> http://trac.mapfish.org/trac/mapfish/wiki/HowToMapFishServerApache and it
> seems I am doing something wrong because i get "500 internal server error".
> Now I am trying to find out what is wrong. On the howto page it says this:
>
> Now create a file named wsgi.load in the Apache modules directory
> (/etc/apache2/mods-available) with this content:
>
> LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
>
> You can now enable wsgi into Apache (a2enmod wsgi) and restart Apache.
>
> So the questions are:
> - I do not have "mods-available" on Apache for OS X. So I put this in
> httpd.conf which should do the same as a load file (?)
> <IfModule !mod_wsgi.c>
>    LoadModule wsgi_module libexec/apache2/mod_wsgi.so
> </IfModule>
>
> - I am not sure what it means to "enable wsgi_module". I cannot find the
> command "a2enmod".
>
> I have done the other steps on the howto page but get this error:
>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Target WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi' cannot be
> loaded as Python module.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Exception occurred processing WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi'.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] Traceback (most
> recent call last):
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi", line 11, in
> <module>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]
> fileConfig('/Library/WebServer/mapfishserver/MapFishApp/developement.ini')
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 76, in fileConfig
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     formatters =
> _create_formatters(cp)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 108, in _create_formatters
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     flist =
> cp.get("formatters", "keys")
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py",
> line 511, in get
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     raise
> NoSectionError(section)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] NoSectionError: No
> section: 'formatters'

Hi Asle,

Can you check you have a "formatters" section in your development.ini
file? (Feel also free to post your entire development.ini).

Thanks,
--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@...
http://www.camptocamp.com


_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users

Re: Installing mapfish server with wsgi_mod - what is a2enmod?

by asleB :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I have been investigating this. I suspect this can have something to do with what Python version is beeing used.
Now this was an issue when I compiled MapFish (had to use MacPorts python with correct headers) so this could be an issue now also. I did some testing and like I wrote I got the "hello world" test working. I also read that the errors could be from not using a different python version. I found this (Django related but still somewhat relevant)
http://groups.google.com/group/django-users/msg/b7bfcc750ff9de14

So I testet with this demo file. But this works fine for me. How do I know what python version mod_wsgi is using? Is there any way to change this?

  # Attempt to import 'socket' module.
import socket
 # Now for the hello world application.
def application(environ, start_response):
    status = '200 OK'
    output = 'Hello World!'

    response_headers = [('Content-type', 'text/plain'),
                        ('Content-Length', str(len(output)))]
    start_response(status, response_headers)

    return [output]


Hoping for any help ;-)
/asle

2009/11/10 Asle Benoni <asle.benoni@...>
Hello, here is my development.ini

Now I think that mod_wsgi works correctly. I tried to make a testfile myapp.wsgi  like here and put it in a virtualhost.
http://wiki.pylonshq.com/display/pylonscookbook/mod_wsgi+and+workingenv.py#check-mod-wsgi-is-installed-correctly

So the problem I think is my config and not the apache module.

# MapFishApp - Pylons development environment configuration                 
                                                                                                                                                                                                
#                                                                                                                                                                                                                                                                           
# The %(here)s variable will be replaced with the parent directory of this file                                                                                                                                                                                             
#                                                                                                                                                                                                                                                                           
[DEFAULT]
debug = true
# Uncomment and replace with the address which should receive any error reports                                                                                                                                                                                             
#email_to = you@...                                                                                                                                                                                                                                              
smtp_server = localhost
error_email_from = paste@localhost

[server:main]
use = egg:Paste#http                                                                                                                                                                                                                                                        
host = 85.196.85.67
port = 5000

[app:main]
use = egg:MapFishApp
full_stack = true
static_files = true

cache_dir = %(here)s/data
beaker.session.key = mapfishapp
beaker.session.secret = somesecret

# If you'd like to fine-tune the individual locations of the cache data dirs                                                                                                                                                                                                
# for the Cache data, or the Session saves, un-comment the desired settings                                                                                                                                                                                                 
# here:                                                                                                                                                                                                                                                                     
#beaker.cache.data_dir = %(here)s/data/cache                                                                                                                                                                                                                                
#beaker.session.data_dir = %(here)s/data/sessions                                                                                                                                                                                                                           

# SQLAlchemy database URL                                                                                                                                                                                                                                                   
sqlalchemy.url = postgres://user:passw@localhost:5432/geodb
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*                                                                                                                                                                                                 
# Debug mode will enable the interactive debugging tool, allowing ANYONE to                                                                                                                                                                                                 
# execute malicious code after an exception is raised.                                                                                                                                                                                                                      
#set debug = false                                                                                                                                                                                                                                                          

# Logging configuration                                                                                                                                                                                                                                                     
[loggers]
keys = root, routes, mapfishapp, sqlalchemy

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console
[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.                                                                                                                                                                                                             

[logger_mapfishapp]
level = DEBUG
handlers =
qualname = mapfishapp

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.                                                                                                                                                                                                                                          
# "level = DEBUG" logs SQL queries and results.                                                                                                                                                                                                                             
# "level = WARN" logs neither.  (Recommended for production systems.)   

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S


2009/11/10 Eric Lemoine <eric.lemoine@...>

On Mon, Nov 9, 2009 at 3:56 PM, Asle Benoni <asle.benoni@...> wrote:
> Hello,
> I am installing on OS X 10.5.8 MapFish server according to
> http://trac.mapfish.org/trac/mapfish/wiki/HowToMapFishServerApache and it
> seems I am doing something wrong because i get "500 internal server error".
> Now I am trying to find out what is wrong. On the howto page it says this:
>
> Now create a file named wsgi.load in the Apache modules directory
> (/etc/apache2/mods-available) with this content:
>
> LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
>
> You can now enable wsgi into Apache (a2enmod wsgi) and restart Apache.
>
> So the questions are:
> - I do not have "mods-available" on Apache for OS X. So I put this in
> httpd.conf which should do the same as a load file (?)
> <IfModule !mod_wsgi.c>
>    LoadModule wsgi_module libexec/apache2/mod_wsgi.so
> </IfModule>
>
> - I am not sure what it means to "enable wsgi_module". I cannot find the
> command "a2enmod".
>
> I have done the other steps on the howto page but get this error:
>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Target WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi' cannot be
> loaded as Python module.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Exception occurred processing WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi'.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] Traceback (most
> recent call last):
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi", line 11, in
> <module>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]
> fileConfig('/Library/WebServer/mapfishserver/MapFishApp/developement.ini')
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 76, in fileConfig
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     formatters =
> _create_formatters(cp)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 108, in _create_formatters
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     flist =
> cp.get("formatters", "keys")
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py",
> line 511, in get
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     raise
> NoSectionError(section)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] NoSectionError: No
> section: 'formatters'

Hi Asle,

Can you check you have a "formatters" section in your development.ini
file? (Feel also free to post your entire development.ini).

Thanks,
--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@...
http://www.camptocamp.com



_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users

Re: Installing mapfish server with wsgi_mod - what is a2enmod?

by cedricmoullet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Which Python version do you use ?
Try to use 2.5.
Cédric

On Thu, Nov 12, 2009 at 3:19 PM, Asle Benoni <asle.benoni@...> wrote:
Hi,
I have been investigating this. I suspect this can have something to do with what Python version is beeing used.
Now this was an issue when I compiled MapFish (had to use MacPorts python with correct headers) so this could be an issue now also. I did some testing and like I wrote I got the "hello world" test working. I also read that the errors could be from not using a different python version. I found this (Django related but still somewhat relevant)
http://groups.google.com/group/django-users/msg/b7bfcc750ff9de14

So I testet with this demo file. But this works fine for me. How do I know what python version mod_wsgi is using? Is there any way to change this?

  # Attempt to import 'socket' module.
import socket
 # Now for the hello world application.
def application(environ, start_response):
    status = '200 OK'
    output = 'Hello World!'

    response_headers = [('Content-type', 'text/plain'),
                        ('Content-Length', str(len(output)))]
    start_response(status, response_headers)

    return [output]


Hoping for any help ;-)
/asle

2009/11/10 Asle Benoni <asle.benoni@...>

Hello, here is my development.ini

Now I think that mod_wsgi works correctly. I tried to make a testfile myapp.wsgi  like here and put it in a virtualhost.
http://wiki.pylonshq.com/display/pylonscookbook/mod_wsgi+and+workingenv.py#check-mod-wsgi-is-installed-correctly

So the problem I think is my config and not the apache module.

# MapFishApp - Pylons development environment configuration                 
                                                                                                                                                                                                
#                                                                                                                                                                                                                                                                           
# The %(here)s variable will be replaced with the parent directory of this file                                                                                                                                                                                             
#                                                                                                                                                                                                                                                                           
[DEFAULT]
debug = true
# Uncomment and replace with the address which should receive any error reports                                                                                                                                                                                             
#email_to = you@...                                                                                                                                                                                                                                              
smtp_server = localhost
error_email_from = paste@localhost

[server:main]
use = egg:Paste#http                                                                                                                                                                                                                                                        
host = 85.196.85.67
port = 5000

[app:main]
use = egg:MapFishApp
full_stack = true
static_files = true

cache_dir = %(here)s/data
beaker.session.key = mapfishapp
beaker.session.secret = somesecret

# If you'd like to fine-tune the individual locations of the cache data dirs                                                                                                                                                                                                
# for the Cache data, or the Session saves, un-comment the desired settings                                                                                                                                                                                                 
# here:                                                                                                                                                                                                                                                                     
#beaker.cache.data_dir = %(here)s/data/cache                                                                                                                                                                                                                                
#beaker.session.data_dir = %(here)s/data/sessions                                                                                                                                                                                                                           

# SQLAlchemy database URL                                                                                                                                                                                                                                                   
sqlalchemy.url = postgres://user:passw@localhost:5432/geodb
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*                                                                                                                                                                                                 
# Debug mode will enable the interactive debugging tool, allowing ANYONE to                                                                                                                                                                                                 
# execute malicious code after an exception is raised.                                                                                                                                                                                                                      
#set debug = false                                                                                                                                                                                                                                                          

# Logging configuration                                                                                                                                                                                                                                                     
[loggers]
keys = root, routes, mapfishapp, sqlalchemy

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console
[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.                                                                                                                                                                                                             

[logger_mapfishapp]
level = DEBUG
handlers =
qualname = mapfishapp

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.                                                                                                                                                                                                                                          
# "level = DEBUG" logs SQL queries and results.                                                                                                                                                                                                                             
# "level = WARN" logs neither.  (Recommended for production systems.)   

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S


2009/11/10 Eric Lemoine <eric.lemoine@...>

On Mon, Nov 9, 2009 at 3:56 PM, Asle Benoni <asle.benoni@...> wrote:
> Hello,
> I am installing on OS X 10.5.8 MapFish server according to
> http://trac.mapfish.org/trac/mapfish/wiki/HowToMapFishServerApache and it
> seems I am doing something wrong because i get "500 internal server error".
> Now I am trying to find out what is wrong. On the howto page it says this:
>
> Now create a file named wsgi.load in the Apache modules directory
> (/etc/apache2/mods-available) with this content:
>
> LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
>
> You can now enable wsgi into Apache (a2enmod wsgi) and restart Apache.
>
> So the questions are:
> - I do not have "mods-available" on Apache for OS X. So I put this in
> httpd.conf which should do the same as a load file (?)
> <IfModule !mod_wsgi.c>
>    LoadModule wsgi_module libexec/apache2/mod_wsgi.so
> </IfModule>
>
> - I am not sure what it means to "enable wsgi_module". I cannot find the
> command "a2enmod".
>
> I have done the other steps on the howto page but get this error:
>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Target WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi' cannot be
> loaded as Python module.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] mod_wsgi
> (pid=90674): Exception occurred processing WSGI script
> '/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi'.
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] Traceback (most
> recent call last):
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/WebServer/mapfishserver/MapFishApp/MapFishApp.wsgi", line 11, in
> <module>
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]
> fileConfig('/Library/WebServer/mapfishserver/MapFishApp/developement.ini')
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 76, in fileConfig
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     formatters =
> _create_formatters(cp)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/Library/Python/2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/util/logging_config.py",
> line 108, in _create_formatters
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     flist =
> cp.get("formatters", "keys")
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]   File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py",
> line 511, in get
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103]     raise
> NoSectionError(section)
> [Mon Nov 09 15:56:14 2009] [error] [client 84.48.176.103] NoSectionError: No
> section: 'formatters'

Hi Asle,

Can you check you have a "formatters" section in your development.ini
file? (Feel also free to post your entire development.ini).

Thanks,
--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@...
http://www.camptocamp.com



_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users




--
CTO Geospatial Camptocamp SA
Cédric Moullet
PSE A
CH-1015 Lausanne
www.camptocamp.com  / www.mapfish.org / twitter.com/cedricmoullet / mapfishblog.blogspot.com/

+41 79 759 69 83 (mobile)
+41 21 619 10 21 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)

_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users