Apache 1.3.37 + mod_python 2.7.11

taguapire

Verified User
Joined
Jul 8, 2007
Messages
24
[NOT SOLVED][NOT REQUIRED ANYMORE] Apache 1.3.37 + mod_python 2.7.11

Hi,

My main goal is get Django framwork running in any of my customers accounts.

What I did:

I compiled mod_python 2.7.11 with OPT = -DEAPI:
./configure
edited src/MakeFile for get OPT variable set to -DEAPI
make
make install

I restarted apache, I got mod_python loaded message at log.

All fine up to here, but when I try to run any python scrip it just shows the content of the script file.

My first sub-goal is to guet any python script running without configure .httaccess I want to do it using VirtualHost directive, I tried to access mydomain.com/path_to_app/, but I get an message saying that I don't have permissions to acces that directory. I tried to acces the file by itself but I get some python errors, mostly related to python can't find name.class

I tried every example and direction that I found on some related forums for get mod_python running. I tried the Django VirtualHost configuration as is stated at their doc page but it didn't work.

If some one can give me every needed direction/step for get mod_python and django working at my server I will apreciate that very much.

I'm running CentOS 5.0 with Apache 1.3.37 and compiled mod_python 2.7.11 by myself.

Thanks in advance,

Taguapire.

I can't do use of mod_python with django at my actual server, I will move my project to mod_wsgi, it uses less memory and is supossedly more easy to deploy.

Tanks to any person who replied to this topic.
 
Last edited:
I can't believe it

I supossed that this forum is for DirectAdmin technical support. I'm wrong? Sorry if it isn't.

I can't belevie it, even that any forum admin didn't reply to this post at least for say that it can't be handled or any thing else.

I did a lot of search at the entire forum for my request and I found nothing relevant, only FreeBSD mod_python configuration that doesn't work for my Apache CentOS based server. I can't get my Apache living with PHP and python at the same time.

I figured out how this fourum just is useless because of poor provided support from both, DirectAdmin personnel and community.

Bad way. Sorry for the rant and thank you any way.

Taguapire.
 
Last edited:
I supossed that this forum is for DirectAdmin technical support. I'm wrong? Sorry if it isn't.

I can't belevie it, even that any forum admin didn't reply to this post at least for say that it can't be handled or any thing else.

I did a lot of search at the entire forum for my request and I found nothing relevant, only FreeBSD mod_python configuration that doesn't work for my Apache CentOS based server. I can't get my Apache living with PHP and python at the same time.

I figured out how this fourum just is useless because of poor provided support from both, DirectAdmin personnel and community.

Bad way. Sorry for the rant and thank you any way.

Taguapire.
Don't know how I've never seen this thread, but did you add the mime type? The server may be able to run it, but it doesn't know to unless you tell it what extension relates to mod_python.
 
Hi Dravvu,

Tank you very much for your reply, I added the mime type before, but can you say me how it must be configured? I mean where and what to put in?

Regards,

Taguapire.
 
My configurations using DirectAdmin CP:

@ Httpd.conf Customization for mydomain.com:
<Location "/test/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE test.settings
PythonDebug On
</Location>

@ User Installed MimeTypes:
applicaiton/x-bytecode.python .pyc
text/x-script.phyton .py

RESULTS:
mydomain.com/test/

Forbidden
You don't have permission to access /test/ on this server. www.mydomain.com

Any clue?

Regards,

Taguapire.
 
You need an index page to not get a permission denied error.

index.html index.htm index.shtml index.php

Or else create a file called .htaccess in the folder with the following:

Options +Indexes

May also be a permission problem too so check chmod settings.
 
Last edited:
You need an index page to not get a permission denied error.

index.html index.htm index.shtml index.php

Or else create a file called .htaccess in the folder with the following:

Options +Indexes

May also be a permission problem too so check chmod settings.

Index files are not intended for Python stuff I tought. Becaus at Django mod_python configuration page documentation they don't mention anything about indexes, just for django python interpreter. If I create an index file, it will be opened instead of python program.

There is something missing, I don't know what.

Regards,

Taguapire.

B.T.W. All file permissions are set to the owner account.
 
Index files are not intended for Python stuff I tought. Becaus at Django mod_python configuration page documentation they don't mention anything about indexes, just for django python interpreter. If I create an index file, it will be opened instead of python program.

There is something missing, I don't know what.

Regards,

Taguapire.

B.T.W. All file permissions are set to the owner account.
Well unless there's an index file of some sort, you're going to get that "Forbidden" page. If there's no index file, Apache thinks you're wanting to view the contents of that directory and since that currently isn't allowed, it tells you that you can't do that.

You could use the .htaccess trick that chatwizard posted above to let you get a list of all the files in the directory instead. That might be what you're looking for.
 
I think it's fairly obvious by now that few, if any, of us understand anything about django.
I supossed that this forum is for DirectAdmin technical support. I'm wrong? Sorry if it isn't.
This is a community help forum. If your DA license includes support you can get support from DirectAdmin staff here.
I can't belevie it, even that any forum admin didn't reply to this post at least for say that it can't be handled or any thing else.
There are several forum administrators. I generally don't answer to posts if I don't know the answer, because when I did I got complaints that I shouldn't answer if I didn't know.
I did a lot of search at the entire forum for my request and I found nothing relevant, only FreeBSD mod_python configuration that doesn't work for my Apache CentOS based server. I can't get my Apache living with PHP and python at the same time.
Is this a DirectAdmin issue? What specifically is DirectAdmin doing that keeps this from happening?
I figured out how this fourum just is useless because of poor provided support from both, DirectAdmin personnel and community.
Certainly a lot of us think the forum is useful and use it often. It it's not useful to you please feel free to not use it.

Jeff
 
This is a community help forum. If your DA license includes support you can get support from DirectAdmin staff here.

Good to know that.

There are several forum administrators. I generally don't answer to posts if I don't know the answer, because when I did I got complaints that I shouldn't answer if I didn't know.

Wise policy, but from a different aproach, If you dig into others problems may be you can near them to a solution, even if you don't know about that, but is just my personal apreciation.

Is this a DirectAdmin issue? What specifically is DirectAdmin doing that keeps this from happening?

I tought that DirectAdmin is overriden some of my configuration, becasue of that I used the own CP for do the configuration but it just didn't work.

Certainly a lot of us think the forum is useful and use it often. It it's not useful to you please feel free to not use it.

Always is a choice, but from now I can apreciate that support workflow for DirectAdmin is somewhat tricky.

I really apreciate that you took some of your time for reply to this post.

Regards,

Taguapire.
 
Wise policy, but from a different aproach, If you dig into others problems may be you can near them to a solution, even if you don't know about that, but is just my personal apreciation.
I run a third-party support company. I spend up to a few ours a day helping out on the Directadmin forums where I can, but generally if I don't know the answer to something I really can't take the time to learn it to help someone else; after all that person could take the time to learn it as well. Of course in our role as a third party support company we're happy to help any new clients, but I'm sure you don't want to hear that :).
I tought that DirectAdmin is overriden some of my configuration, becasue of that I used the own CP for do the configuration but it just didn't work.
It may have. Did you save your changed configuration, and then compare it later when it didn't work under DirectAdmin?

Or, perhaps better, did you check to make sure that you and DirectAdmin expect the same setup, paths, versions, etc.?
Always is a choice, but from now I can apreciate that support workflow for DirectAdmin is somewhat tricky.
Most of us find that support for DirectAdmin itself is excellent, but you may disagree.

Jeff
 
Django

Well, I thought I may chime in here to help, as i work with the developers of django and have had the same questions as you guys that i have been fotrunate enough to just ask them.

With mod_python, it just like using mod_perl. No index page is required, thats baloney. When you initiate the third party module, it does the handling of execute. If you are getting an error, you may want to check your python path and make sure your django trunk install is in your site-packages folder within your version of python. You ALSO want to have your local copy application in the site path as well, this is where it will pick up the application.settings file as well as all your other apps. Its really nice how it works, and wish DA would include better support for modules like mod_python and mod_perl by extending the httpd.conf edit to a user level that wouldn't harm other users if the file was corrupt
 
Well, I thought I may chime in here to help, as i work with the developers of django and have had the same questions as you guys that i have been fotrunate enough to just ask them.

With mod_python, it just like using mod_perl. No index page is required, thats baloney. When you initiate the third party module, it does the handling of execute. If you are getting an error, you may want to check your python path and make sure your django trunk install is in your site-packages folder within your version of python. You ALSO want to have your local copy application in the site path as well, this is where it will pick up the application.settings file as well as all your other apps. Its really nice how it works, and wish DA would include better support for modules like mod_python and mod_perl by extending the httpd.conf edit to a user level that wouldn't harm other users if the file was corrupt

Oh, can you post your trace as well if this is still a problem? I have a feeling its a python path issue.
 
Back
Top