Discussion:
How to execute C based CGI binary with mongoose web server
Aurovind Sagar
2015-12-02 06:29:51 UTC
Permalink
I am new to mongoose. What I got to know is that mongoose supports CGI
binary execution. But its not working in my set-up. I am using 3.7 mongoose
and I cannot change my version for work reasons. I tried by renaming to
".cgi". I tried giving the configuration option -cgi_pattern
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-users+***@googlegroups.com.
To post to this group, send email to mongoose-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
Sergey Lyubka
2015-12-02 06:55:15 UTC
Permalink
Hi Aurovind.

1. What environment are you using?
2. Elaborate on what exactly config are you using and what results do you
get.
Post by Aurovind Sagar
I am new to mongoose. What I got to know is that mongoose supports CGI
binary execution. But its not working in my set-up. I am using 3.7 mongoose
and I cannot change my version for work reasons. I tried by renaming to
".cgi". I tried giving the configuration option -cgi_pattern
--
You received this message because you are subscribed to the Google Groups
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-users+***@googlegroups.com.
To post to this group, send email to mongoose-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
Prasanth G
2015-12-02 07:36:56 UTC
Permalink
Hi Sergey,

Thanks for responding. Me and Aurovind were using it in an embedded
platform which is linux based.
The configs we tried out are,

mongoose
-document_root /cgi-bin/
-cgi_pattern /cgi-bin/**.*
-listening_ports 8047

I've c based executable in /cgi-bin/ location with extension .cgi. But when
I give http request using browser, in my browser I get, Error 404: Not
Found, File not Found.

Any help will be appreciated.

Thanks,
Prasanth
Post by Sergey Lyubka
Hi Aurovind.
1. What environment are you using?
2. Elaborate on what exactly config are you using and what results do you
get.
Post by Aurovind Sagar
I am new to mongoose. What I got to know is that mongoose supports CGI
binary execution. But its not working in my set-up. I am using 3.7 mongoose
and I cannot change my version for work reasons. I tried by renaming to
".cgi". I tried giving the configuration option -cgi_pattern
--
You received this message because you are subscribed to the Google Groups
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-users+***@googlegroups.com.
To post to this group, send email to mongoose-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2015-12-02 10:36:51 UTC
Permalink
Post by Prasanth G
Hi Sergey,
-document_root /cgi-bin/
-cgi_pattern /cgi-bin/**.*
-listening_ports 8047
I use Mongoose 3.2 to run cgi with executables written in both C and VB5!
cgi_pattern **.exe$|**.pl$|**.php$

document root points to the folder that contains both mongoose.exe and
mongoose.conf

Regards
Chris
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-users+***@googlegroups.com.
To post to this group, send email to mongoose-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
Aurovind Sagar
2015-12-02 12:24:22 UTC
Permalink
In linux .exe pattern wont work right?
So should it be **.cgi$|** ?
Post by c***@gmail.com
Post by Prasanth G
Hi Sergey,
-document_root /cgi-bin/
-cgi_pattern /cgi-bin/**.*
-listening_ports 8047
I use Mongoose 3.2 to run cgi with executables written in both C and VB5!
cgi_pattern **.exe$|**.pl$|**.php$
document root points to the folder that contains both mongoose.exe and
mongoose.conf
Regards
Chris
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-users+***@googlegroups.com.
To post to this group, send email to mongoose-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2015-12-02 13:15:00 UTC
Permalink
Post by Aurovind Sagar
In linux .exe pattern wont work right?
So should it be **.cgi$|** ?
I keep the executables in cgi-bin under the document root, and the URL
references them as .../cgi-bin/whatever.exe. It is many years since I
worked with Linux, but I seem to remember you can call the executables
pretty much anything, so you will need Sergey or another knowledgeable
person to tell you what the pattern should be for your naming convention.

Regards
Chris
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-users+***@googlegroups.com.
To post to this group, send email to mongoose-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
Sergey Lyubka
2015-12-02 13:30:45 UTC
Permalink
Post by Prasanth G
Hi Sergey,
Thanks for responding. Me and Aurovind were using it in an embedded
platform which is linux based.
The configs we tried out are,
mongoose
-document_root /cgi-bin/
-cgi_pattern /cgi-bin/**.*
-listening_ports 8047
Here's what I suggest.

*File system layout:*

/web_root/
index.html
... other html , css , js files ...
cgi-bin/
... CGI scripts...


*Configuration:*

mongoose -document_root '/web_root' -cgi_pattern '/cgi-bin/**'
-listening_ports
8047


Regards,
--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-users+***@googlegroups.com.
To post to this group, send email to mongoose-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.
Loading...