Ok, I know this sounds weird, but I have a client who has some perl and
php things already written that they want to use. I don't really know
much about either of these languages, so I just assumed I could throw
them in the public directory and post to them through a form by calling
the script name. That didn't work. I read a few different posts that I
need to setup a cgi-bin folder. So, I made the new folder in my railsapp
root directory, then put the scripts in there. When I put
<form action="form.pl">... this gives my a 404 error. How can I make
that form work? Do I need to add a .htaccess into my public folder that
does some sort of rewrite or something?
Thanks for the response. Yeah, I was putting it in a folder called
"cgi-bin" that is located inside my application root folder. When I
would post to it using <form action="/cgi-bin/form.pl" method="post"> it
would just give me a 404.
I decided to drop the perl, and just focus on PHP. I found a similar
script done in PHP.
But actually, if it were me -- I would bypass a lot of probable grief
by creating a virtual host, e.g. scripts.example.com, just to run the
PHP/cgi/whatever other stuff independently of your Rails install.
OMG, lol. This whole thing is a huge mess. The actual server
administrator doesn't know how to do anything on it. I had originally
suggested doing that, and he goes "I don't know how, can you do it?".
This is for a place here in vegas, and they have weird rules
about how
things have to be done. I don't know how to create a subdomain on their
site, and neither do they >.<
The *server administrator* doesn't know how? Madre de dios.
It's so trivial. Seriously, look at the comments in httpd.conf. That's
enough for most stuff, and if not, the Apache httpd documentation
is very nice. Read both.
The formmail.php file is in the public folder. It was suggested by a
friend of mine that I create a subfolder like "stupid_php_scripts" and
then tell mongrel to ignore that folder since everything is being
proxied through mongrel. then I would post to
"/stupid_php_scripts/formmail.php". The only thing is that I don't know
how to tell mongrel to ignore some fodlers or files.
I don't know either, but I'd bet it would be easier to configure httpd
to *not* proxy `/stupid_php_scripts/*` to mongrel.