1

So I have an Apache 2.4.6 @ CentOS 7 and I want to run a specific python script using some data from a post request from that server but I don't want for anyone to be able to look in the python source. My webdev experience in backend is minimal and by my searches so far I've figured that my options are:

  • enabling mod_wsgi (I've already done that to test the execution of simple script without any parameters but I don't see how I connect my script functions to the form)
  • Django application (but I don't have any experience on that and it seems like a lot of work for my purpose)

I don't know any php and I am wondering what's the simplest way to perform that task without having to take up a whole new stack.

2
  • The most simple way from the Apache side would be to run the script via CGI. Unluckily this is also the most inconvenient way for development and has gone out of fashion for many reasons. Commented Jul 17, 2018 at 11:06
  • But what is the proper way to connect my script execution using some post parameters? Do I need to use php? Commented Jul 17, 2018 at 11:25

1 Answer 1

1

You might want to look into Flask (http://flask.pocoo.org/); it abstracts all the boring WSGI/HTTP stuff nicely, but it's more minimal than Django. You'll still need mod_wsgi.

Sign up to request clarification or add additional context in comments.

1 Comment

Oh right I forgot about flask, it might be easier for my small task. mod_wsgi is not a problem I already tested execution of a python script. I will look into flash. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.