logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Recognizing files coded in Python
Author
cep



Joined: 23 Sep 2008
Posts: 4
Location: cep

PostPosted: Sat 31 Jan '15 2:21    Post subject: Recognizing files coded in Python Reply with quote

I am looking for help.
I have installed mod_python and the mods-enabled directory in the Apache2 directory looks correct (links to the available directory and the .load file), but I can't get Apache2 to process Python coded files.
I am missing something, but don't know what.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 31 Jan '15 5:25    Post subject: Reply with quote

maybe;

AddHandler mod_python .py
Back to top
cep



Joined: 23 Sep 2008
Posts: 4
Location: cep

PostPosted: Sat 31 Jan '15 19:53    Post subject: Reply with quote

AddHandler already configured as you suggested.
Any other ideas?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 31 Jan '15 20:39    Post subject: Reply with quote

No, not from me. Did you restart the Apache service or reboot the server?

However lack of showing us anything other the a minor description of what you did (which did not include mentioning AddHandler) doesn't help anybody help you since we're just guessing at this stage.

Show the configuration you used specific to your problem, don't just drop the entire config here as it's against the rules. Maybe someone will see something you may have done incorrectly or didn't do at all.
Back to top
cep



Joined: 23 Sep 2008
Posts: 4
Location: cep

PostPosted: Sun 01 Feb '15 1:28    Post subject: Reply with quote

Okay, Since you just said 'maybe, Addhandler' I assumed you knew the entire Directory definition.
My Directory define in apache2.conf is:

<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Addhandler mod_python .py
PythonHandler mod_python.publisher
</Directory>

My Directory define in sites-available/000-default.conf is:

ServerAdmin webmaster@localhost
DocumentRoot "/var/www/html"
DirectoryIndex index.html index.php index.py
<Directory /var/www/html>
OPtions +Indexes +FollowSymLinks -MultiViews +ExecCGI
AllowOverride None
Require all granted
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>

In mods-available/python.load there is the statement:

LoadModule python_module /usr/lib/apache2/modules/mod_python.so

I hope this is all the configuration statements that are needed to add processing python files in Apache.
Back to top


Reply to topic   Topic: Recognizing files coded in Python View previous topic :: View next topic
Post new topic   Forum Index -> Apache