I have a hello world script written in python called hello.py. I am using apache on a windows machine, and I'd like the script to run automatically, whenever I enter something like http://localhost/
Can someone please tell me how to do this ?
PS: If I point to the script directly from the brows...
You are almost certainly better with a framework though. Straight CGI is ok, but once you want to start accepting GET/POST data, File uploads or something else, the CGI is a bit of a pain.
@brainydexter Gave you an answer, might not be the answer :-)
also I agree with @Zoredache -- you probably want to use a web framework of some kind rather than straight CGI if at all possible. CGI is just... yuck.
@brainydexter If you're sending them off to cgi-bin then a redirect might be better than changing DirectoryIndex (look up RedirectPermanent in the Apache docs)
il check it out right now. quick q: everywhere it is recommended to keep your stuff in cgi-bin, so I should stick to that or stuff my scripts in htdocs
your script is a CGI, so it needs to be somewhere that Apache is configured to allow CGIs to execute (otherwise the server will just spit out your source code)
cgi-bin is traditional, but I've also seen some people turn on ExecCGI for the entire webroot. Not a fan of that practice myself though
it's not exposing every directory so much as allowing the web server to execute programs in a broader list of paths. The idea behind /cgi-bin was you would allow the web server to execute programs in one well-controlled directory (that only the sysadmin could write to) so some wayward designer couldn't put insecure scripts on your server.
heh, then you're done unless they want to be able to execute them from wherever (in which case you want to turn on ExecCGI), but I'd talk to the requesters first and get a better feel for what they're looking for.
funny you mention all of this, coz being in this job, i was like, what the heck do i do now, i dont want to get back into gamedev, i dont want to do this 'werid' stuff here, so what do i do :P
gamedev is very unstable
not that other jobs are very stable, but still i feel the probability of a stable job is higher outside of games
when I got here all the servers were named for godzilla characters with no kind of separation/distinction -- it was a nightmare to find out which server had each role
it SEEMS complicated, until you use it in practice
@brainydexter That you can't do... the web server can either hand you a file (index.html) or run a script (hello.py), but it can't do both for one request.
You can run hello.py and then when it's done have it output the contents of index.html...
the only way I can think of to do that is to have the script spit out the file -- You can redirect (or alternatively rewrite) requests for the file to point to the script
@BenPilbrow If he has to do this for multiple files then a rewrite rule probably makes more sense (write one script that takes ?f=filename as a parameter, and use a Rewrite directive to change requests for /file to /script?f=file)
right..let me ask them again, what the heck do they want..i dont think they want the above happening..i think they are looking for a concurrent process kinda thing
This has been driving me nuts but my server has been using a highly excessive amount of bandwidth for the last two months, and I can't figure out how/why/where.
This month, for example, it's used 210 Gb download traffic (inbound to the server), but I can't figure out where it's going - the disk ...
you perform an audit and determine that you're complying with the requirements of HIPAA - "Certification" just means you have an auditor's statement affirming that
ahh, I consider those to be paper certs, though if your clients want 'em get 'em
if you've done PCI-DSS you already learned everything you need to know about HIPAA - Just replace the sensitive cardholder data bits with sensitive PHI ("Protected Health Information") from the HIPAA law :-D
And yes, it's just to put on a business card to say "I know HIPAA stuff and have papers and eberyfing!"
I also just enjoy having a goal in mind whilst learning, so certs help get me off the ground in that way when I'm attacking a totally new subject.
EHR systems seem like the SAP of the Dr's world. Big, expensive boondoggles that run the risk of capsizing an entire organization with it's inflexible, bullshit workflows.
right now our system has "EMR Light" built in to it (it tracks data from our software/diagnostic tools)
Centricity is big at hospitals, and I know a few hospitals actually make physicians who are affiliated with them use it (I assume the hospital foots the bill)
Our other big system to target is the VA's home-grown system
Wow, anything built by the VA would seem like it would win Dr. Seuss awards. I was increasingly glad that I never joined the US Military when I saw my friends' dealings with the VA after they got out.
Goodness. Do you have form letters you send back to save on typing. "Due to the extreme stupidity of that request, we will be charging you a dumb-tax."
I am running market research for our IaaS and he wants to compete with firehost and high security. I get to find potential clients.... anyone interested :)?
@WesleyDavid We're focusing on PCI compliance and high security, for PCI you get 2 VMs to be PCI compilant(1 web and 1DB) and we have DDoS mitigation and free CDN
@WesleyDavid oh they were totally mellow until asked to do something stupid, then they'd retreat to the office in the back of the datacenter and kvetch :)
@WesleyDavid The dry erase mood bar over my office door has said "pensive, mildly cranky" for almost a year now. I'm waiting for my mood to change so I can change it.