« first day (145 days earlier)      last day (4831 days later) » 
00:00 - 20:0020:00 - 00:00

8:00 PM
Please be more specific about what you mean by run pyton script when you access index.html page.
 
its a simple hello world script written in python
 
So you are trying to have the output of a python script be displayed?
 
i tend to use fastcgi for that kinda thing..
 
and a cgi module
 
but that's just how i roll
or i just use django for everything :P
 
@Zoredache: thanks for the link. il check it out. im also posting the question
 
For apache see this manual section if you wait a straight cgi. httpd.apache.org/docs/2.0/howto/cgi.html
@brainydexter, except your question is borderline, and may actually belong on stackoverflow.
And if you aren't very specific about what you want, and how it is sysadmin related it will probably be closed as off-topic or migrated.
 
I'll see whether i vote to migrate once i've read the question.
 
8:04 PM
:P
@brainydexter ask anyway..
 
lol ok
 
also, search first ;)
 
almost done
 
@brainydexter Your python script works when you launch it from the command line right? :)
 
0
Q: Run python script automatically on apache server

brainydexterI 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...

yes
it also works when i point to it directly from the browser
 
8:06 PM
@brainydexter, don't forget that you need to send a mime-type if you are running as a cgi.
 
let me paste my python script in the q
 
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.
 
added
*src added
@Zoredache: isend the content-type
i've been hinted to modify the httpd.conf file
 
@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.
 
@voretaq7: thanks, let me try that out
also, I understand that, and that's what I've been reading everywhere
but people at my work just want to get work done fast..they leave me no choice
i don't have a background in webservers, so its all the more new to me
 
8:12 PM
I answered too, fwiw. Singing the praises of frameworks. As Per Usual.
 
using a framework for your python bits will definitely help with the "fast" (and the debugging)
 
Also, this does belong on SF.
 
thanks folks, setting the DirectoryIndex to /cgi-bin/hello.py did it
 
yeah, it's an apache configuration question...
 
I will definitely check out your recommendations, because I think they would want me to do something more than hello world :)
 
8:16 PM
@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)
 
@brainydexter don't write off frameworks so soon, even though you've got your project working for now.
 
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
 
yes, thats what i have been reading everyehwere
*everywhere
all the tutorials end up doing that
i don't know enough about configurations, but i didnt like the idea of exposing every directory
 
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.
 
8:21 PM
gotcha
@voretaq7: I am using scriptAlias right now to specify the cgi-bin
i dont think i always want the URL to be redirected to that specific location
 
That's the traditional way to do things
do you know what kind of project this is going to evolve in to, or were you just tasked with "Make it so we can execute python scripts on $_MACHINE"?
 
make it so we can execute python scripts :)
 
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.
 
yea, they don't like to be questioned :), so I keep my trap shut and just get it done
anyways, thanks a ton for all the help
 
@brainydexter first sign of a bad job: People don't want to be asked questions to clarify requirements
 
8:27 PM
@voretaq7: tell me about it, this job turned out to be a farce, they lied on the phone and when i got here, it was completely different
 
Welcome to IT :-)
 
lol, i was a game developer :(
there goes the dream of doing something fun
 
awww you thought game development was fun! :-)
some of my friends went in to game coding -- none of them like it
 
it burns you out, because atleast i get obsessed with it
and you spend copious amounts of your life, coding away to glory
 
their stress level is higher than mine was when I was consulting for investment banks
I much prefer a job that's normally calm
 
8:30 PM
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
 
I like admin/engineering/architecture work because if you're reasonably good at it it does tend to be pretty stable
 
true
theres something that has caught my eye recently
interactive media as a graphics engineer
 
I'm fortunate in that I've always been able to choose to leave my jobs - something I definitely don't take for granted :)
 
true :)
 
"Graphics Engineer" is a new title on me
 
8:33 PM
you make things look "awesome" :P
 
so graphic artist / UI designer with a fancy title?
 
:-)
 
from an engineer perspective
you deal with shaders...special effects
 
from my perspective as an engineer the best systems have no graphics, and no cover panels on the hardware :-)
though I do appreciate a nice kitty cat silkscreened onto a motherboard every now and then :-)
 
8:36 PM
lol
im all for doing something on the machine and see it visually
 
KITTY!
 
@brainydexter I rather like the designers signatures and dog prints on the inside of my cases.
 
@voretaq7 Wow, did Indiana Jones have to fight off a bunch of Mayans to find that relic and give it to you?
 
8:40 PM
@WesleyDavid It belongs in a museum!
 
"We have top men working on this"
"Who?!"
"*TOP* Men"
Actually, the correct response to your quote was "So do you!"
I've watched those movies more than any other movies ever. Except the fourth one. Saw it once in the theater and wished I hadn't.
 
@WesleyDavid Clearly the best way to survive a nuclear explosion is within a fridge.
 
@WesleyDavid that one isn't mine, but I DO have a lunchbox IPX somewhere
Also known as "The GOOD kind of IPX!"
 
I like how the phrase "Jump the shark" has itself jumped the shark and is now replaced in some circles with the phrase "nuked the fridge"
 
@WesleyDavid MY LEFTOVERS!
 
8:45 PM
Funny about Dan Carley's tweet today. I was thinking what to name my company's internal servers.
Was leaning towards constellations
Or other celestial objects.
@voretaq7 You do consulting work, right?
 
is there a way i can specify in httpd.conf file, such that whenever I request for foo.html, my own script hello.py could be run ?
 
@WesleyDavid used to
 
@voretaq7 Oh, I thought you did in the present tense. Nvm.
 
my last company had themed schemes (Rocks/Minerals for mail, dead artists for databases, trees for infrastructure servers, etc.)
 
See, that seems too complicated.
 
8:47 PM
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
 
Exactly. That's why I think I'll just use functional names
 
"Opal is down" = "This is an email-related problem"
 
SQL08R2.PHX.01
EXCH10.EDGE1.VEGAS
Boring, but oh so informational.
 
the problem is when you have something difficult to spell, or when people don't know how to spell "day-gah" (Degas)
similar to ours. app01.ny ; dbi02.ny ; mail. ns1.dev...
 
I think the most fun servers to name are file servers and print servers
Because everyone has to reference them
File server = breadbox.
"Check your folder in the breadbox"
"Did you put it in the breadbox?"
 
8:50 PM
for file and print servers themed names (or a themed alias) are a good idea
 
@tom I saw that, nice of him to come back
 
users won't remember filestore01.accounting.ny
but they'll remember "FluffyKitty"
 
@voretaq7: can you please hint me at what directive to look for in httpd.conf, running hello.py when index.html is requested
 
@voretaq7 CNAMEs are my friend. filestore01.accounting.ny gets CNAMEd to "WaffleMaker"
=)
 
@voretaq7 Or bigsumbitch on the storage backend to the fileserver :)
 
8:51 PM
DirectoryIndex makes it a either or situation
 
The SAN shall be named BucketOfBlood.
 
@brainydexter RedirectPermanent would be my choice (it issues a 302 Redirect and sends the user to the alternate location)
 
And no one will be the wiser.
 
@WesleyDavid My SAN is named NAS. My NAS is named SAN. I'm not dyslexic, I just like fucking with all the other admins. (Note: Not Really.)
 
but I don't see how redirection helps in this case, since we want both index.html and hello.py be run
 
8:53 PM
@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...
 
ah..
 
which is a little ghetto, but not totally unreasonable :)
 
right..sigh :( this is going to cause much grieve
 
Would a rewrite work? (Not really an Apache expert, so not sure)
 
they expect me to run the script whenever a specific html file is requested
 
8:55 PM
this is where good frameworks come in to play -- the best ones allow you to intermix your python with HTML
ok so when you request file X they want the script run and then you get file X from the web server?
 
i think so thats what the guy meant
 
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
 
8:58 PM
web servers don't really do concurrent (within a single request)... at least I've never seen them do it. Script execution is always linear AFAIK :-/
 
so i thought too
 
1
Q: Monitor bandwidth per-process

jonodloThis 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 ...

This is like a perennial question :-)
 
So it looks like I'm going to need to be HIPAA certified. Yay.
 
@WesleyDavid there's really no "HIPAA Certified"
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
 
I meant getting certified from the HIPAA institute as a HCP and maybe HCSS
Not that I need to "Certify" or audit a Dr's office.
But to get some contracts from a few Dr's offices I'd like to have a few HIPAA Professional certifications.
 
9:06 PM
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
 
Yeah, I've had to deal with PCI a little bit.
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.
 
@WesleyDavid you want a laugh, read the HL7 "specification"
 
@voretaq7 How did you come to need to know about that choice delicacy?
Did you do work for Dr offices?
 
I work for a medical devices company
one of our ongoing boondoggles is trying to integrate with EHR/EMR systems
we never get anywhere because the "standards" blow chunks
 
@voretaq7 oooOOooo, no wonder you had to work as a bartender. You need to mix yourself some drinks often I bet. =)
So you know decent amounts about EHR thingies. Which system do you use?
 
9:16 PM
none :-)
 
I was just looking at sagehealth.com
Oh I see, you have to integrate with others' EHR systems?
 
the one we want to target is GE Centricity (gehealthcare.com/centricity)
which is a big one in the field
yup
 
Is it mostly for large organizations like hospitals? Or would smaller practices use it?
 
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
 
Okay, cool. So did you personally have to take HIPAA classes or did you just scour books, articles and etc.?
 
9:19 PM
which hopefully is sane
I sat down for a week with the CFR and read up on the requirements
 
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.
 
deemed them "Sufficiently close to PCI that I can use the PCI-DSS outline for implementation targets"
and wen from there :)
 
heh, okay. So I can kill two birds with one stone. I'm currently boning up on PCI-DSS stuff for a small office I do some work for.
Well, looks like 2011 will be full of fun.
 
in the broadest terms HIPAA can be boiled down to "Don't disclose patient identifiers" (name, SSN, etc.)
it's a little bit easier for me because our CEO is an MD
 
in the broadest terms HIPAA can be boiled down to "Don't be stupid"
^FTFY
 
9:23 PM
our clients don't get it though. "Can't you just email me the report?" is like our most common question
 
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."
 
we're one of the few diagnostic tools that requires an internet connection and that's like three kind of hell
 
Yikes. Lots of SSL, I'm assuming?
 
@WesleyDavid yup
 
10:15 PM
G'day!
 
g'morrow
 
Hey guys
 
hey grasshopper
 
thats right you can't use young :P
 
me? no.
 
10:22 PM
grasshopper eh? I have a hungry gecko at home...
what? Lizards need food too!
 
Anyhow I have what s most likely a frowned on topic
 
Please don't let it be mod_rewrite!
 
or Windows service packs!
we need a mod_rewrite stackexchange site
all of you masochists, go over there --->
 
But then Server Fault would have NO traffic!
 
Oh what fun could be had in the mod_rewrite chat room
 
10:24 PM
Slight exaggeration, but meh!
 
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 :)?
 
@BenPilbrow PERFECT! A system is at its best with an absence of users!
damn annoying test loads...
 
I totally agree.... however my job is best with users [breaking shit]
 
@BenPilbrow haha we don't get paid until something breaks
 
@Jacob The only infrastructure services I want are power, cooling and multiple pipes large enough to shove the Fat Lady through :-)
for this I pay handsomely provided the power stays on, the cooling stays cold, and my pipes remain free of clogs.
(Also for the rest of the week I'm referring to Cisco/Network folks as "my little data plumbers")
 
10:27 PM
@voretaq7 I figured.... but its a job in this economy so I really want to keep it
 
@voretaq7 does it go through AMS-IX? There's a lot of clogs there.. ;)
 
So IaaS... like simple hosting and VPS stuff or server images like Rackspace?
 
I'm not sure what IaaS entails.. sounds a bit buzzwordy to me
 
@WesleyDavid I'd imagine more rented server/SAN/Switches/Routers kinda thing
Managed Services kinda arrangement
 
Infrastructure as a Service
 
10:28 PM
?
 
Basically Think S3 and EC2
 
Or PBX
 
@WesleyDavid mmh, I don't really consider that "infrastructure" but I'm a crotchety old man
 
Personally, I'm a fan of.... GAH SYSADMIN1138 IS BLUE!! CALL PARAMEDICS!!
I draw the line at mouth to mouth though. I like you and all, but just no.
 
@WesleyDavid I got that much :P
 
10:29 PM
@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
 
See, infrastructure to me is racks and switches, servers not so much
 
Jacob, what are you using for your mitigation?
 
@Jacob Gotcha. Are these managed services as well or just "Here's a VPS. If you have problems, bite us."
 
@TomOConnor Infrastructure to me is datacenter infrastructure (Power, Cooling and if you're feeling generous Network/Fibre Network)
 
@voretaq7 Dude, stop saying "crotchety old man" you're like a year older than me. You're depressing me.
 
10:31 PM
@pobk We haven't finalized and I can't tell you as I am under NDA, if you want to know I can give you the email...
 
@Jacob Nah, it's ok...
 
@WesleyDavid Both
 
@WesleyDavid I learned from much more crotchety, far older men. It rubs off on ya.
it comes with an instinctual hatred of the users too :)
 
@voretaq7 I think I sadly missed out on that kind of education. The older guys I hung out with were really mellow.
 
@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 :)
 
10:36 PM
@voretaq7 And by "kvetch" you mean "mailbomb the office".
 
@WesleyDavid naw, 10-page emails explaining why "X" is a bad idea are my style :-)
usually 2-3 pages of "NO! BAD!" and then 7-8 pages of Alternatives A through C
 
 
1 hour later…
11:46 PM
@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.
 
00:00 - 20:0020:00 - 00:00

« first day (145 days earlier)      last day (4831 days later) »