You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Frank Peavy <fp...@pop.net> on 2001/12/08 19:25:53 UTC

Use of Apache for Remote Control -

First of all, I am new to Apache, so forgive me for asking a fairly general 
question.
I hope this is the right forum.
*****************************************************************%
My question:
I was wondering if I could use Apache to act as the server for a remote 
interface to other devices.

Basically, I would like to control various environmental controls in my 
house via the web.
I have developed websites(HTML pages, etc.) before so that part of the 
mechanics is easy.

My intent is to use Python to send data to my serial port. Running Python 
programs when I am at the keyboard is not an issue, but if I wanted to 
initiate them through a website, that's where I am lost.

Any assistance on this matter would be appreciated.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by Frank Peavy <fp...@pop.net>.
I am a newbie on this one(just starting out). I have Mandrake Linux 8.1 but 
I do not know which version of Apache that comes with it. I will use which 
ever Linux distribution and Apache that is appropriate.

At 01:41 PM 12/8/01 -0500, you wrote:
>can I ask what version of apache you have...
>and what distribution of linux you have installed
>
>
>Frank Peavy wrote:
> >
> > First of all, I am new to Apache, so forgive me for asking a fairly general
> > question.
> > I hope this is the right forum.
> > *****************************************************************%
> > My question:
> > I was wondering if I could use Apache to act as the server for a remote
> > interface to other devices.
> >
> > Basically, I would like to control various environmental controls in my
> > house via the web.
> > I have developed websites(HTML pages, etc.) before so that part of the
> > mechanics is easy.
> >
> > My intent is to use Python to send data to my serial port. Running Python
> > programs when I am at the keyboard is not an issue, but if I wanted to
> > initiate them through a website, that's where I am lost.
> >
> > Any assistance on this matter would be appreciated.
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
>--
><******** http://www.myispnet.net ********>
>Admin
>admin@myispnet.net
>ICQ# 7110071
>MSN Messenger= myispnet@hotmail.com
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by Admin-myispnet <ko...@naisp.net>.
can I ask what version of apache you have...
and what distribution of linux you have installed


Frank Peavy wrote:
> 
> First of all, I am new to Apache, so forgive me for asking a fairly general
> question.
> I hope this is the right forum.
> *****************************************************************%
> My question:
> I was wondering if I could use Apache to act as the server for a remote
> interface to other devices.
> 
> Basically, I would like to control various environmental controls in my
> house via the web.
> I have developed websites(HTML pages, etc.) before so that part of the
> mechanics is easy.
> 
> My intent is to use Python to send data to my serial port. Running Python
> programs when I am at the keyboard is not an issue, but if I wanted to
> initiate them through a website, that's where I am lost.
> 
> Any assistance on this matter would be appreciated.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 
<******** http://www.myispnet.net ********>
Admin
admin@myispnet.net
ICQ# 7110071
MSN Messenger= myispnet@hotmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by jo...@slive.ca.
On Sat, 8 Dec 2001, Frank Peavy wrote:

> So, I am at a remote location sitting at my workstation(my web client) and
> I access my webserver running Apache, which renders my index.html page(lets
> assume that the page has some data entry fields).
>
> Now, if I initiate a CGI request(?), I can have the data from my form past
> to a (as an example a Python program) program. The program would execute
> and if there is data that needs to be communicated back, the program could
> send that to Apache, which would in-turn, renders it to my client.

That is exactly what happens.

>
> How did I do?
>

You look at some of the references I sent.  In the first two pages of
google responses there were several introductory tutorials on using CGI
with python.  If you have specific questions after reading those, post
again.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by Frank Peavy <fp...@pop.net>.
In response to Joshua's comments at the bottom of this message:

Sorry for being so "dense" about this; maybe if I try to put your 
"thoughts" into my words, it might help.

So, I am at a remote location sitting at my workstation(my web client) and 
I access my webserver running Apache, which renders my index.html page(lets 
assume that the page has some data entry fields).

Now, if I initiate a CGI request(?), I can have the data from my form past 
to a (as an example a Python program) program. The program would execute 
and if there is data that needs to be communicated back, the program could 
send that to Apache, which would in-turn, renders it to my client.

How did I do?


Joshua wrote:
> >  >... I highly recommend you
> > >simply use the Common Gateway Interface (CGI).  This is a standard
> > >specification for how external programs should interface with a web
> > >server, and it will work in pretty much every web server.  It simply
> > >defines how to pass data from a web form to a program, and how to return
> > >data from the program to the web client.
> >
> > Maybe I miss understood the last sentence. Was the last word "client"
> > supposed to be "server"?
>
> >From the program to the client is what I meant.  Of course, the server
>stands between the two and acts as the intermediary.
>
>Joshua.
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, 8 Dec 2001, Frank Peavy wrote:

> Joshua wrote:
>  >... I highly recommend you
> >simply use the Common Gateway Interface (CGI).  This is a standard
> >specification for how external programs should interface with a web
> >server, and it will work in pretty much every web server.  It simply
> >defines how to pass data from a web form to a program, and how to return
> >data from the program to the web client.
>
> Maybe I miss understood the last sentence. Was the last word "client"
> supposed to be "server"?

>From the program to the client is what I meant.  Of course, the server
stands between the two and acts as the intermediary.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by Frank Peavy <fp...@pop.net>.
Joshua wrote:
 >... I highly recommend you
>simply use the Common Gateway Interface (CGI).  This is a standard
>specification for how external programs should interface with a web
>server, and it will work in pretty much every web server.  It simply
>defines how to pass data from a web form to a program, and how to return
>data from the program to the web client.

Maybe I miss understood the last sentence. Was the last word "client" 
supposed to be "server"?




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by Irmund Thum <it...@it97.dyn.dhs.org>.
Frank Peavy schrieb:
> 
> I was wondering if I could use Apache to act as the server for a remote
> interface to other devices.

you can -and I know some examples in perl, php so it should be possible
in python too,
and probably there is an adequate python group or mailing list
-- 
_ ___
|  |  Irmund    Thum
|  |

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Use of Apache for Remote Control -

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, 8 Dec 2001, Frank Peavy wrote:
> My intent is to use Python to send data to my serial port. Running Python
> programs when I am at the keyboard is not an issue, but if I wanted to
> initiate them through a website, that's where I am lost.
>

There are several ways to run python programs through apache, including
special modules that do this.  However, since your requirements seem
rather basic and you are just getting started, I highly recommend you
simply use the Common Gateway Interface (CGI).  This is a standard
specification for how external programs should interface with a web
server, and it will work in pretty much every web server.  It simply
defines how to pass data from a web form to a program, and how to return
data from the program to the web client.  For details on how to configure
apache to use cgi:
http://httpd.apache.org/docs/howto/cgi.html

For details on learning to use CGI, there are tons of references.
Google is always a good starting point:
http://www.google.com/search?q=python+cgi
Or you can look at the basic CGI specification:
http://httpd.apache.org/docs/misc/FAQ.html#cgi-spec

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org