Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7770167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:20:33+00:00 2026-06-01T16:20:33+00:00

while I have quite some python experience, I’ve never used it for web and

  • 0

while I have quite some python experience, I’ve never used it for web and I have vast amount of web experience with PHP.

Now I want to create a simple python script (lets call it service.py) that runs on example.com. I installed mod_wsgi as suggested by the docs, my web server is Apache 2.2, the mod_wsgi is loaded successfully.

How do I configure my web server/mod_wsgi so that requests comming to example.com/service are processed by service.py?

Then how do I access the request params (like $_GET, $_POST, $_FILES) from the python script?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:20:34+00:00Added an answer on June 1, 2026 at 4:20 pm

    With mod_wsgi, you configure which URLs are served by setting WSGIScriptAlias. Your script, though, needs to be an actual WSGI application, which exposes an application variable which is called by the server.

    I suspect it’d be easier to configure your script as simple CGI. You can then use the cgi module from the standard library to access your request params (note, though, that the examples you give are PHP-specific: they’re accessed differently in Python, depending on the specific framework).

    Another alternative would be to use a mini-framework like Flask, which would encapsulate all this and give you a simple interface to use in your service.py script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used PyGame for a while now, and quite enjoyed doing so, but
I've used TFS for quite some time now and I never noticed this behavior.
I have a Python web application (Django, specifically). I'm reading in some data from
I have been trying for quite a while to check if submitted links are
I have been using LinqToSQL for quite a while as well as using Devart,
I have been using this copy method for quite a while, in lots of
I have been working on it for quite a while, but still can't figure
I have a problem with Javascript that keeps bugging me for quite a while
I've been looking around for quite a while and feel that I have a
Ok, i have been buried in MAPKit for quite a while. I have dropping

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.