[albatross-users] Transferring a site

Greg Hamilton gregh at object-craft.com.au
Thu Nov 7 11:42:47 EST 2002


Are you able to run a simple 'Hello World' cgi script ?

This is all stuff you've almost certainly already checked and it might  
not be relevant anyway as I don't know anything about configuring  
Apache with mod_python :

For a regular CGI config you need to tell Apache it can execute scripts  
in your <Directory> either by using the ScriptAlias directive

or something like this  -

<Directory "/u01/www/sites/norwood/Site">
    Options All MultiViews ExecCGI
    ....
</Directory>

The AddHandler directive is handy for letting Apache know which file  
types to execute as cgi-

eg.

AddHandler cgi-script .cgi .py .pl

I would definitely try to run the Albatross app without mod_python to  
eliminate mod_python as a possible cause of the problem.

Good luck

Greg Hamilton



On Thursday, November 7, 2002, at 10:56 AM, Brian Brown wrote:

>
> On Wednesday, November 6, 2002, at 03:55 PM, Greg Hamilton wrote:
>
>> Brian,
>>
>> it sounds like an Apache configuration problem to me.
>>
>> Have you tried running without mod_python ?
>>
> No, not yet
>
>
>> Is the main module of your Albatross app executable ? I have a  
>> feeling  some types of file transfer (ftp ?) don't maintain file  
>> permissions so  transferring from your laptop to the OpenBSD box may  
>> have broken the  app.
>>
>
> All the code is in cvs, so that should be an issue, I just did a cvs  
> checkout on the site.
>
>
>> Have you checked the Apache error log ? If you have an Apache config   
>> problem or something is going wrong with your Python code that  
>> doesn't  result in a traceback displayed in your browser then the  
>> error should  end up in the Apache error log.
>>
>
> The error logs show no errors, which leads me to believe that my main  
> app is returning apache.OK
>
> here is what I have the PythonHandler set to(nbc.py)
> from mod_python import apache
> from albatross import RandomModularSessionApp, SessionAppContext
> from albatross.apacheapp import Request
>
> class AppContext(SessionAppContext):
>     def __init__(self, appctx):
>         SessionAppContext.__init__(self, appctx)
>         self.locals.menulist = { 'Home':'home',
>                                  'Ministries':'ministries',
>                                  'Beliefs':'beliefs',
>                                  'Information': 'info'
>                                }
>         self.submenulist = {'Contact Us': 'contact', 'About  
> Us':'about'}
>         self.add_session_vars('submenulist')
>         self.locals.realpath = "/u01/www/sites/norwood/Site/pages"
>
>     def set_sub(self, menu):
>         self.submenulist = menu
>
>     def get_sub(self):
>         return self.submenulist
>
> class App(RandomModularSessionApp):
>     def __init__(self):
>         RandomModularSessionApp.__init__(self,
>                            base_url = 'nbc',
>                            #page_path = './pages',
>                            page_path =  
> '/u01/www/sites/norwood/Site/pages',
>                            #module_path =  
> '/u01/www/sites/norwood/Site',
>                            #template_path =  
> '/u01/www/sites/norwood/Site',
>                            start_page = 'home',
>                            secret = 'secret',
>                            session_appid = 'nbc1'
>                            )
>     def create_context(self):
>        return AppContext(self)
>
>
> def handler(req):
>     app.run(Request(req))
>     return apache.OK
>
> app = App()
>
> # load the macros
> app.load_template('/u01/www/sites/norwood/Site/pages/ 
> macros.html').to_html(
> app)
> -----------
> And here is the apache config part that is relevant(although I've had  
> it in and out of a VirtualHost directive) :
>
>   <Directory "/u01/www/sites/norwood/Site">
>       AllowOverride All
>       PythonPath  
> "['/u01/www/sites/norwood/Site','/usr/local/lib/python2.2','/usr/ 
> local/lib/
> python2.2/site-packages','/usr/local/lib/python2.2/site-
> packages/albatross','/usr/local/lib/python2.2/site-
> packages/mod_python','/usr/local/lib/python2.2/lib-dynload']"
>       #AddHandler python-program .py .html
>       Options All MultiViews
>       SetHandler python-program
>       PythonHandler nbc
>       PythonDebug On
>   </Directory>
>
>
>
>> Greg Hamilton
>>
>> On Thursday, November 7, 2002, at 09:27 AM, Brian Brown wrote:
>>
>>> I've been developing a site on my MacOSX notebook with mod_python  
>>> and  Albatross. Works great. I've just tried to get it going on an  
>>> OpenBSD  box using mod_python/apache and Albatross, without much  
>>> success.
>>>
>>> Mod_python is loading fine, Albatross installed without a hitch.  
>>> I've  tried with both an .htaccess file as well as setting the  
>>> config for my  directory in the httpd.conf - when I try to to run  
>>> anything, Albatross  returns apache.OK and sends out the default  
>>> "Oops!" page instead of  any content from the site. I have looked at  
>>> everything 100 times and  made sure my PythonPath was set in the  
>>> httpd.conf, but to no avail....  anyone have any suggestions? I  
>>> don't think this is an Albatross  problem, but I'm not sure.
>>>
>>> Albatross 1.01, python 2.2, mod_python 2.7.8, latest apache 1.3  
>>> series.
>>>
>>> Thanks!
>>>
>>> Brian
>>>
>>> _______________________________________________
>>> Albatross-users mailing list
>>> Albatross-users at object-craft.com.au
>>> https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-  
>>> users
>>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 5326 bytes
Desc: not available
URL: <http://www.object-craft.com.au/pipermail/albatross-users/attachments/20021107/9b0a6284/attachment.bin>


More information about the Albatross-users mailing list