Hi; Been a while since I had root access to a server and without GUI. I uploaded and tried to surf to this page: http://209.216.9.56/global_solutions/index.py?w=1024 but the code is displayed, not executed. Is it that I need to inform Apache that *.py files are to be interpreted by python? Please advise, and if easy, tell me what to do. TIA, Victro
Victor:
Been a while since I had root access to a server and without GUI. I uploaded and tried to surf to this page: http://209.216.9.56/global_solutions/index.py?w=1024 but the code is displayed, not executed. Is it that I need to inform Apache that *.py files are to be interpreted by python? Please advise, and if easy, tell me what to do.
Have you tried this: http://www.modpython.org/
Neil
-- Neil Aggarwal, (281)846-8957, http://www.JAMMConsulting.com http://www.jammconsulting.com/ CentOS 5.4 KVM VPS $55/mo, no setup fee, no contract, dedicated 64bit CPU 1GB dedicated RAM, 40GB RAID storage, 500GB/mo premium BW, Zero downtime
Ok. I don't need to work with mod_python right now. I just need to get my python pages serving. I'm up to the point now where I'm getting 403 errors. Why? Why doesn't it just serve the python pages? I've updated httpd.conf with the appropriate AddHandler. Please advise. V
On Fri, Nov 6, 2009 at 10:20 AM, Neil Aggarwal neil@jammconsulting.comwrote:
Victor:
Been a while since I had root access to a server and without GUI. I uploaded and tried to surf to this page: http://209.216.9.56/global_solutions/index.py?w=1024 but the code is displayed, not executed. Is it that I need to inform Apache that *.py files are to be interpreted by python? Please advise, and if easy, tell me what to do.
Have you tried this: http://www.modpython.org/
Neil
-- Neil Aggarwal, (281)846-8957, http://www.JAMMConsulting.com http://www.jammconsulting.com/ CentOS 5.4 KVM VPS $55/mo, no setup fee, no contract, dedicated 64bit CPU 1GB dedicated RAM, 40GB RAID storage, 500GB/mo premium BW, Zero downtime
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Yeah, I forgot to mention I'd done all that. chmod 755 *. I got this from the error logs, but it applies to the index.py file. I also created a "hello world" test.py file that threw the same error, and there's nothing in the log files about that. It doesn't import anything or do any calculation, just prints. Here's the tail:
[root@13gems global_solutions]# tail /etc/httpd/logs/error_log [Fri Nov 06 10:05:05 2009] [error] [client 66.248.168.98] File does not exist: /var/www/html/angrynates.com/favicon.ico [Fri Nov 06 10:05:16 2009] [error] [client 66.248.168.98] Options ExecCGI is off in this directory: /var/www/html/ angrynates.com/global_solutions/index.py, referer: http://angrynates.com/global_solutions/ [Fri Nov 06 10:23:09 2009] [error] [client 71.170.73.194] Options ExecCGI is off in this directory: /var/www/html/ angrynates.com/global_solutions/index.py [Fri Nov 06 10:23:40 2009] [error] [client 130.226.184.8] Options ExecCGI is off in this directory: /var/www/html/ angrynates.com/global_solutions/index.py [Fri Nov 06 10:24:35 2009] [error] [client 150.70.84.155] Options ExecCGI is off in this directory: /var/www/html/ angrynates.com/global_solutions/index.py [Fri Nov 06 10:26:27 2009] [error] [client 66.248.168.98] Options ExecCGI is off in this directory: /var/www/html/angrynates.com/global_solutions/test.py [Fri Nov 06 10:32:06 2009] [error] [client 216.110.94.227] Options ExecCGI is off in this directory: /var/www/html/ angrynates.com/global_solutions/index.py [Fri Nov 06 10:32:09 2009] [error] [client 216.110.94.227] File does not exist: /var/www/html/angrynates.com/favicon.ico [Fri Nov 06 10:32:57 2009] [error] [client 71.170.73.194] Options ExecCGI is off in this directory: /var/www/html/ angrynates.com/global_solutions/index.py [Fri Nov 06 10:33:29 2009] [error] [client 130.226.184.8] Options ExecCGI is off in this directory: /var/www/html/ angrynates.com/global_solutions/index.py
TIA, V
On Fri, Nov 6, 2009 at 1:32 PM, Jacob P jperkins@hostgator.com wrote:
Check the logs.
If you get errors, check logs. If you get nothing, check logs. Apache logs are sometimes good in finding errors.
Check the permissions on the files. Since it's an executable, it needs to have 755 permissions.
Victor Subervi wrote:
Ok. I don't need to work with mod_python right now. I just need to get my python pages serving. I'm up to the point now where I'm getting 403 errors. Why? Why doesn't it just serve the python pages? I've updated httpd.conf with the appropriate AddHandler. Please advise. V
On Fri, Nov 6, 2009 at 10:20 AM, Neil Aggarwal neil@jammconsulting.comwrote:
Victor:
Been a while since I had root access to a server and without GUI. I uploaded and tried to surf to this page: http://209.216.9.56/global_solutions/index.py?w=1024 but the code is displayed, not executed. Is it that I need to inform Apache that *.py files are to be interpreted by python? Please advise, and if easy, tell me what to do.
Have you tried this: http://www.modpython.org/
Neil
-- Neil Aggarwal, (281)846-8957, http://www.JAMMConsulting.com http://www.jammconsulting.com/ CentOS 5.4 KVM VPS $55/mo, no setup fee, no contract, dedicated 64bit CPU 1GB dedicated RAM, 40GB RAID storage, 500GB/mo premium BW, Zero downtime
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing listCentOS@centos.orghttp://lists.centos.org/mailman/listinfo/centos
-- Thanks!
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Victor wrote: <snip>
log files about that. It doesn't import anything or do any calculation, just prints. Here's the tail:
[root@13gems global_solutions]# tail /etc/httpd/logs/error_log
<snip>
[Fri Nov 06 10:05:16 2009] [error] [client 66.248.168.98] Options ExecCGI is off in this directory:
/var/www/html/angrynates.com/global_solutions/index.py, referer: http://angrynates.com/global_solutions/ <snip> And that's your answer: you don't have ExecCGI for the directory that the python scripts are in.
mark
That's my answer? You sure? Those errors are for index.py. As I mentioned in my last email, I decided to test for test.py which imports nothing, no cgi, nothing. Please try again. V
On Fri, Nov 6, 2009 at 1:39 PM, m.roth@5-cent.us wrote:
Victor wrote:
<snip> > log files about that. It doesn't import anything or do any calculation, > just prints. Here's the tail: > > [root@13gems global_solutions]# tail /etc/httpd/logs/error_log <snip> > [Fri Nov 06 10:05:16 2009] [error] [client 66.248.168.98] Options ExecCGI > is off in this directory: /var/www/html/angrynates.com/global_solutions/index.py, referer: http://angrynates.com/global_solutions/ <snip> And that's your answer: you don't have ExecCGI for the directory that the python scripts are in.
mark
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
You could help us out a lot if you'd post /any/configuration you've done to support Python scripts. You're not providing anything for us to help you. -Alan
Victor Subervi wrote:
That's my answer? You sure? Those errors are for index.py. As I mentioned in my last email, I decided to test for test.py which imports nothing, no cgi, nothing. Please try again.
Well, apparently it threw the same error for test.py as well on the second test! I've added this:
<VirtualHost *:80> ServerAdmin me@creative.vi DocumentRoot /var/www/html/angrynates.com ServerName angrynates.com Options +ExecCGI -IncludesNoExec </VirtualHost>
but the options line didn't seem to help any. Ideas? V
On Fri, Nov 6, 2009 at 2:12 PM, Victor Subervi victorsubervi@gmail.comwrote:
That's my answer? You sure? Those errors are for index.py. As I mentioned in my last email, I decided to test for test.py which imports nothing, no cgi, nothing. Please try again. V
On Fri, Nov 6, 2009 at 1:39 PM, m.roth@5-cent.us wrote:
Victor wrote:
<snip> > log files about that. It doesn't import anything or do any calculation, > just prints. Here's the tail: > > [root@13gems global_solutions]# tail /etc/httpd/logs/error_log <snip> > [Fri Nov 06 10:05:16 2009] [error] [client 66.248.168.98] Options ExecCGI > is off in this directory: /var/www/html/angrynates.com/global_solutions/index.py, referer: http://angrynates.com/global_solutions/ <snip> And that's your answer: you don't have ExecCGI for the directory that the python scripts are in.
mark
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
It's possible you need somewhere in your configuration: AddHandler python-program .py
If it's not already there. But without knowing anything about what you're doing... Try Googling for mod_python for the documentation. -Alan
Victor Subervi wrote:
Well, apparently it threw the same error for test.py as well on the second test! I've added this:
<VirtualHost *:80> ServerAdmin me@creative.vi mailto:me@creative.vi DocumentRoot /var/www/html/angrynates.com http://angrynates.com ServerName angrynates.com http://angrynates.com Options +ExecCGI -IncludesNoExec
</VirtualHost>
but the options line didn't seem to help any. Ideas? V
On Fri, Nov 6, 2009 at 2:12 PM, Victor Subervi <victorsubervi@gmail.com mailto:victorsubervi@gmail.com> wrote:
That's my answer? You sure? Those errors are for index.py. As I mentioned in my last email, I decided to test for test.py which imports nothing, no cgi, nothing. Please try again. V On Fri, Nov 6, 2009 at 1:39 PM, <m.roth@5-cent.us <mailto:m.roth@5-cent.us>> wrote: Victor wrote: <snip> > log files about that. It doesn't import anything or do any calculation, > just prints. Here's the tail: > > [root@13gems global_solutions]# tail /etc/httpd/logs/error_log <snip> > [Fri Nov 06 10:05:16 2009] [error] [client 66.248.168.98] Options ExecCGI > is off in this directory: /var/www/html/angrynates.com/global_solutions/index.py <http://angrynates.com/global_solutions/index.py>, referer: http://angrynates.com/global_solutions/ <snip> And that's your answer: you don't have ExecCGI for the directory that the python scripts are in. mark _______________________________________________ CentOS mailing list CentOS@centos.org <mailto:CentOS@centos.org> http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Alan Sparks schrieb:
It's possible you need somewhere in your configuration: AddHandler python-program .py
If it's not already there. But without knowing anything about what you're doing... Try Googling for mod_python for the documentation.
Why to google for documentation which already ships with the software installed? Both the mod_python rpm as well the httpd one comes with with docs. Much room for Victor doing his homework.
-Alan
Alexander
On Nov 6, 2009, at 2:22 PM, Victor Subervi wrote:
Well, apparently it threw the same error for test.py as well on the second test! I've added this:
<VirtualHost *:80> ServerAdmin me@creative.vi DocumentRoot /var/www/html/angrynates.com ServerName angrynates.com Options +ExecCGI -IncludesNoExec
</VirtualHost>
but the options line didn't seem to help any. Ideas? V
Did your restart the httpd service?
Also, please spend some time reading this in particular:
http://httpd.apache.org/docs/2.0/howto/cgi.html
but also the rest of
http://httpd.apache.org/docs/2.0/
There is a log to digest there but it will help you.
Never mind. Problem was I needed a full path. V
On Fri, Nov 6, 2009 at 2:22 PM, Victor Subervi victorsubervi@gmail.comwrote:
Well, apparently it threw the same error for test.py as well on the second test! I've added this:
<VirtualHost *:80> ServerAdmin me@creative.vi DocumentRoot /var/www/html/angrynates.com ServerName angrynates.com Options +ExecCGI -IncludesNoExec
</VirtualHost>
but the options line didn't seem to help any. Ideas? V
On Fri, Nov 6, 2009 at 2:12 PM, Victor Subervi victorsubervi@gmail.comwrote:
That's my answer? You sure? Those errors are for index.py. As I mentioned in my last email, I decided to test for test.py which imports nothing, no cgi, nothing. Please try again. V
On Fri, Nov 6, 2009 at 1:39 PM, m.roth@5-cent.us wrote:
Victor wrote:
<snip> > log files about that. It doesn't import anything or do any calculation, > just prints. Here's the tail: > > [root@13gems global_solutions]# tail /etc/httpd/logs/error_log <snip> > [Fri Nov 06 10:05:16 2009] [error] [client 66.248.168.98] Options ExecCGI > is off in this directory: /var/www/html/angrynates.com/global_solutions/index.py, referer: http://angrynates.com/global_solutions/ <snip> And that's your answer: you don't have ExecCGI for the directory that the python scripts are in.
mark
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Victor Subervi wrote on Fri, 6 Nov 2009 13:22:57 -0500:
Ok. I don't need to work with mod_python right now. I just need to get my python pages serving. I'm up to the point now where I'm getting 403 errors. Why? Why doesn't it just serve the python pages? I've updated httpd.conf with the appropriate AddHandler. Please advise.
First link on Google: http://www.checkupdown.com/status/E403.html Please ask on an apache mailing list, this is not a centos problem. Or hire someone.
Kai