LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-19-2018, 05:43 PM   #1
dr_strangelove
LQ Newbie
 
Registered: Jun 2010
Location: London, UK
Posts: 10

Rep: Reputation: 0
Unhappy Cannot use query parameters with Apache mod_ext_filter


Hello Linux Questions

I am hoping to build an Apache filter (a Python script) that responds to query parameters. I was keen to use
Code:
mod_ext_filter
rather than use a framework such as Flask (which I use a lot) because I've not really done it before and I will make use of quite a lot of mod_proxy in this project and thought I was keeping it simple

My issue is that when I configure a single virtual host with the following configuration...

Code:
<VirtualHost *:80>
        ExtFilterDefine foo_filter mode=output intype=text/html cmd="/usr/bin/python3 /var/www/html/foo.py"
        SetOutputFilter foo_filter
</VirtualHost>

And /var/www/html/foo.py should (hopefully) display all variables...

Code:
#!/usr/bin/python3
import os

output = "<pre>"
for name, value in globals().copy().items():
  output = output + "name: " + str(name) + "    value: " + str(value) + "\n"

print(output)
When I query the vhost with some query parameters, e.g.

Code:
http://myserver&foo=bar
I get something which does not contain query parameters...

Should I be using QUERY_STRING_UNESCAPED and if so, how would I use it?

Thanks for patience - I think I am missing something obvious
 
Old 05-20-2018, 04:02 AM   #2
dr_strangelove
LQ Newbie
 
Registered: Jun 2010
Location: London, UK
Posts: 10

Original Poster
Rep: Reputation: 0
Smile

Sorry for the false-start, I think that mod_ext_filter might be the wrong tool, I am going to use CGI for now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Most Common Apache Tuning Parameters in Linux LXer Syndicated Linux News 0 06-20-2013 03:21 PM
Apache to query tac_plus linux833 Programming 7 07-30-2012 06:05 PM
[SOLVED] A i-think-a-newbie query in apache-httpd ajaygarg Linux - Server 2 03-25-2012 12:03 PM
An Apache related query saagar Linux - Newbie 1 03-25-2011 02:23 AM
how 2 monitor components of apache???(parameters) shrikanthdiwakar Linux - Server 1 01-26-2008 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration