1. Euphoria web server
- Posted by Andy Drummond Jul 10, 2008
- 1045 views
I am embarrassingly ignorant on TCP/IP and the like. I want to have a web server (in euphoria, of course) which I can use to run CGI programs - also euphoria. There is a nice contribution called webserver, a few years old now, using the eutcp4u package which is even older. The webserver runs as stated, but I can't access it from another computer on the same local network. Does anyone have any suggestions (polite, practical preferably) about how to get a basic webserver going? Our network here is just a simple peer-to-peer thing with specified IP addresses - 192.168.0.nn style. I imagine once it works there it will be able to work over the internet if I use a host name or whatever it's called. It always seems that the basic networking system is horrendously complicated but should be standard for most requirements. The webserver - by L.Bryant? - is nice in that it writes parameters into a file called input.txt, runs the cgi app, then picks up the reply from output.txt. This suits me to the ground. But I can't even get it off the ground, and I need help. So please.... AndyD
2. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 1050 views
Does anyone have any suggestions (polite, practical preferably) about how to get a basic webserver going? Our network here is just a simple peer-to-peer thing with specified IP addresses - 192.168.0.nn style. I imagine once it works there it will be able to work over the internet if I use a host name or whatever it's called. It always seems that the basic networking system is horrendously complicated but should be standard for most requirements. The webserver - by L.Bryant? - is nice in that it writes parameters into a file called input.txt, runs the cgi app, then picks up the reply from output.txt. This suits me to the ground. But I can't even get it off the ground, and I need help. So please....
Andy, I have not used the package you are speaking of, but it sounds like your web server is binding to the 127.0.0.1 address, thus will only take local requests when accessed as 127.0.0.1. You may need to look at the code and tell the webserver to bind either to all available IP addresses on your machine (may/may not be safe) or bind to a specific IP address, such as 192.168.0.xyz.
You must be careful about server software running on your computer, as I am sure you know. It may open a door to unwanted guests.
Jeremy Cowgar
3. Re: Euphoria web server
- Posted by Matt Lewis Jul 10, 2008
- 1038 views
If you have a firewall running, you'll probably need to open an exception for the web server for anyone else to be able to see it.
4. Re: Euphoria web server
- Posted by Andy Drummond Jul 10, 2008
- 1043 views
Does anyone have any suggestions (polite, practical preferably) about how to get a basic webserver going? Our network here is just a simple peer-to-peer thing with specified IP addresses - 192.168.0.nn style. I imagine once it works there it will be able to work over the internet if I use a host name or whatever it's called. It always seems that the basic networking system is horrendously complicated but should be standard for most requirements. The webserver - by L.Bryant? - is nice in that it writes parameters into a file called input.txt, runs the cgi app, then picks up the reply from output.txt. This suits me to the ground. But I can't even get it off the ground, and I need help. So please....
Andy, I have not used the package you are speaking of, but it sounds like your web server is binding to the 127.0.0.1 address, thus will only take local requests when accessed as 127.0.0.1. You may need to look at the code and tell the webserver to bind either to all available IP addresses on your machine (may/may not be safe) or bind to a specific IP address, such as 192.168.0.xyz.
You must be careful about server software running on your computer, as I am sure you know. It may open a door to unwanted guests.
Jeremy Cowgar
Jeremy, Thanks for your thoughts. I have looked and looked and I can find nothing that might bear some relationship to an IP address in either WebServer (which is completely unformatted & uncommented) or EuTCP4U (which is). So I am confused. How can a server open a socket without offering an IP address to allow access?
If anyone is interested in looking at the code (which must be OK as it has some econobucks) they are both in the contribs page, one by Louis Bryant an done by Ray Smith.
Or has anyone got any knowledge of a basic web server which can run nice easy-to-write CGI apps?
Help!
Andy
5. Re: Euphoria web server
- Posted by Andy Drummond Jul 10, 2008
- 1058 views
If you have a firewall running, you'll probably need to open an exception for the web server for anyone else to be able to see it.
No firewall; oldish Win98SE machine. Nothing running and Windows didn't try and do it itself. But it kinda worked when I removed the Vexira anti-virus. I got this message:
There was an error receiving any data from a socket. Louis needs to fix this immediately.
So I guess there is some kind of fault and yes, Vexira was stopping it from acessing but now - LOUIS BRYANT - are you out there?? What happens now?
Oh, but thanks, Matt, this is a major step forward I guess.
Andy
6. Re: Euphoria web server
- Posted by Matt Lewis Jul 10, 2008
- 1067 views
As an easy alternative, you might try shttpd:
http://shttpd.sourceforge.net/
It's pretty easy and lightweight.
7. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 1009 views
Or has anyone got any knowledge of a basic web server which can run nice easy-to-write CGI apps?
This is more of general information, but 4.0 has a cross-platform socket library and CoJaBo on IRC has built a web server using it. Once complete, he was going to submit it as a demo application for the socket lib since we do not have any demos of it yet. However, I have heard reports that the socket lib does not work on Windows 98. I have not investigated why yet. It does work on XP/Vista and of course Linux, FreeBSD and OS X.
Jeremy
8. Re: Euphoria web server
- Posted by Andy Drummond Jul 10, 2008
- 1069 views
As an easy alternative, you might try shttpd:
http://shttpd.sourceforge.net/
It's pretty easy and lightweight.
Thanks, Matt. I have downloaded it and I will look at it this evening & tomorrow. Looks like what I'm after. So lets end this thread until I run into more problems Andy
9. Re: Euphoria web server
- Posted by CoJaBo Jul 10, 2008
- 1007 views
Or has anyone got any knowledge of a basic web server which can run nice easy-to-write CGI apps?
This is more of general information, but 4.0 has a cross-platform socket library and CoJaBo on IRC has built a web server using it. Once complete, he was going to submit it as a demo application for the socket lib since we do not have any demos of it yet. However, I have heard reports that the socket lib does not work on Windows 98. I have not investigated why yet. It does work on XP/Vista and of course Linux, FreeBSD and OS X.
Jeremy
If Eu 4.0 gets setenv and proc_open functions, I should be able to get CGI working cross-platform also. If this gets included with 4.0, it would make it easy to run local CGI apps, or even include some CGI demos with Eu 4 that will run right away. As of now it kindof supports CGI, but the proc_open I have only works on Windows, and is extremely limited by lack of setenv. Looks like setenv is being added now by iamlost, so I'm going to try that out.
10. Re: Euphoria web server
- Posted by Marco A. Achury P. Jul 10, 2008
- 1006 views
I have used Abyss Web Server, is a small download freeware to host one domain, to host more you must to buy the full version, runs on WIN and Linux version, can run Euphoria programs as CGI without previous compile. I have run QBasic as CGI on it www.aprelium.com
11. Re: Euphoria web server
- Posted by Matt Lewis Jul 10, 2008
- 999 views
If Eu 4.0 gets setenv and proc_open functions, I should be able to get CGI working cross-platform also.
proc_open (Google seems to tell me this is some kind of php thing?) sounds like something suitable for a library.
12. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 1019 views
proc_open (Google seems to tell me this is some kind of php thing?) sounds like something suitable for a library.
Jim is working on it now. It's often refered to as popen() on Linux. CreateProcess on Windows. For windows there is capture.zip found in the archive but it's only Windows. Since it's possible on Windows and Unix, to be included in std lib it needs to work on both major platforms. Jim has popen() for Linux wrapped already (something he had done a while ago).
So, making it all work together does not seem to be a hard thing and it's certainly worth while for std lib inclusion.
Jeremy
13. Re: Euphoria web server
- Posted by Mike777 Jul 10, 2008
- 1045 views
Pardon me for asking, but why would anybody use anything other than Apache? It is the defacto standard, runs on multiple platforms, and there are more help files and tutorials available than any other web server? In addition, it has been bundled in various one-click installation routines (WAMP, XAMP, etc.) which make it one of the simplest of applications to deploy.
What am I missing?
Mike777
14. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 998 views
Pardon me for asking, but why would anybody use anything other than Apache? It is the defacto standard, runs on multiple platforms, and there are more help files and tutorials available than any other web server? In addition, it has been bundled in various one-click installation routines (WAMP, XAMP, etc.) which make it one of the simplest of applications to deploy.
What am I missing?
Apache is a beast any way you cut it. I dread developing many diff apps on Apache. I'll always use Lighttpd for local development. A config file w/3 lines in it will work for any of my apps, run it at a console with lighttpd -D -f lighttpd.conf, no install needed, see all stdin/stdout right there, it's cake. Further, if I am developing cgi apps, SCGI apps, FastCGI apps and there is a euphoria web server that I simply do:
C:\MyProjects\forum > euweb
and it works right out of the box, no install what-so-ever except my already existing Euphoria? Whoa. What a perfect setup! Why would you use Apache, or even LigHTTPD? Development would be a breeze.
Jeremy
15. Re: Euphoria web server
- Posted by euphoric (admin) Jul 10, 2008
- 989 views
Why would you use Apache, or even LigHTTPD? Development would be a breeze.
Because that's what most web hosts have.
16. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 983 views
Why would you use Apache, or even LigHTTPD? Development would be a breeze.
Because that's what most web hosts have.
That's what I run on my web server indeed, but I'm not maintaining it on all my laptop, my desktop, my work computer, the computer I am at when I travel, on my thumb drive for when I go to my parents, etc... I'd take euweb or LigHTTPD any day. Whew. Besides, look at some benchmarks. Just because Apache is the number one server does not mean it's there because it's the best. It's overly complex and most lightweight web servers can accomplish the same task a much higher thru put.
This guy here goes for simplicity, speed and just works over complexity, config hassles, mod_rewrite voodoo that even apache developers have problems with any day.
Jeremy
17. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 1013 views
Why would you use Apache, or even LigHTTPD? Development would be a breeze.
Because that's what most web hosts have.
I love this, right in the mod_rewrite docs (which is a module that most people use) it says:
Jeremy
18. Re: Euphoria web server
- Posted by euphoric (admin) Jul 10, 2008
- 973 views
- Last edited Jul 11, 2008
Why would you use Apache, or even LigHTTPD? Development would be a breeze.
Because that's what most web hosts have.
That's what I run on my web server indeed, but I'm not maintaining it on all my laptop, my desktop, my work computer, the computer I am at when I travel, on my thumb drive for when I go to my parents, etc... I'd take euweb or LigHTTPD any day. Whew. Besides, look at some benchmarks. Just because Apache is the number one server does not mean it's there because it's the best. It's overly complex and most lightweight web servers can accomplish the same task a much higher thru put.
We're not arguing quality here. We're arguing platform.
So, if my web host uses Apache, I'm going to have an Apache install at my dev location. Hopefully you're not really maintaining web software from 5 different locations.
I use Apache on my Windows box at home for development because my web host uses Apache. The config file I create at home works on the Linux box at my host.
This guy here goes for simplicity, speed and just works over complexity, config hassles, mod_rewrite voodoo that even apache developers have problems with any day.
I agree. The point remains, I'm not going to config a web server on my development platform that doesn't translate 1:1 to my web hosting platform. Of course, I'm only using one PC to develop on. If I had multiple PCs, I might... no... not even then.
19. Re: Euphoria web server
- Posted by euphoric (admin) Jul 10, 2008
- 1021 views
- Last edited Jul 11, 2008
Why would you use Apache, or even LigHTTPD? Development would be a breeze.
Because that's what most web hosts have.
I love this, right in the mod_rewrite docs (which is a module that most people use) it says:
It's easy enough. I use that module and it turns http://cklester.com into http://www.cklester.com for SEO purposes.
Please note that
http://openeuphoria.org/EUforum/index.cgi
and
http://www.openeuphoria.org/EUforum/index.cgi
provide a different set of links that are not considered the same to search engines (click on those links and you'll see).
However,
resolves to
always. Again, for SEO purposes, which would be especially important to an up-and-coming programming language's revamped web site. :)
Anyway, if my host offered something that was easier to configure, I'd no doubt use it! As it is, I'm stuck with Apache on the host, so I use it on the dev PC.
20. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 955 views
- Last edited Jul 11, 2008
So, if my web host uses Apache, I'm going to have an Apache install at my dev location. Hopefully you're not really maintaining web software from 5 different locations.
I use Apache on my Windows box at home for development because my web host uses Apache. The config file I create at home works on the Linux box at my host.
I agree. The point remains, I'm not going to config a web server on my development platform that doesn't translate 1:1 to my web hosting platform. Of course, I'm only using one PC to develop on. If I had multiple PCs, I might... no... not even then.
Hm, I guess we are in a different boat here. I test my web apps on IIS, LigHTTPD, Apache, TomCat and Jetty as I have some web apps deployed on all of those servers. At a moments notice, the web app could be sold to someone running IIS, or to Apache, or to a Java shop and run on Tomcat. In reality, your web app should care less about what server it's deployed under (or what platform). I personally (outside of work and installs on client servers) use Apache and for one Java app I have, Jetty. Aside from the Java app, the apps will run in all servers. For instance, EUforum here. It's been tested under LigHTTPD, Jetty and Apache.
Jeremy
21. Re: Euphoria web server
- Posted by euphoric (admin) Jul 10, 2008
- 967 views
- Last edited Jul 11, 2008
The point remains, I'm not going to config a web server on my development platform that doesn't translate 1:1 to my web hosting platform. Of course, I'm only using one PC to develop on. If I had multiple PCs, I might... no... not even then.
Hm, I guess we are in a different boat here. I test my web apps on IIS, LigHTTPD, Apache, TomCat and Jetty as I have some web apps deployed on all of those servers.
Well there you have it. I have one app I run on Windows and Linux. I've never had it tested on any other server, but I suspect it would run anyway. It's just a matter of configuring the server. Right? :)
22. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 985 views
- Last edited Jul 11, 2008
The point remains, I'm not going to config a web server on my development platform that doesn't translate 1:1 to my web hosting platform. Of course, I'm only using one PC to develop on. If I had multiple PCs, I might... no... not even then.
Hm, I guess we are in a different boat here. I test my web apps on IIS, LigHTTPD, Apache, TomCat and Jetty as I have some web apps deployed on all of those servers.
Well there you have it. I have one app I run on Windows and Linux. I've never had it tested on any other server, but I suspect it would run anyway. It's just a matter of configuring the server. Right? :)
Most of the time but not always.
Jeremy
23. Re: Euphoria web server
- Posted by Jim Brown Jul 10, 2008
- 1047 views
- Last edited Jul 11, 2008
proc_open (Google seems to tell me this is some kind of php thing?) sounds like something suitable for a library.
Jim is working on it now. It's often refered to as popen() on Linux. CreateProcess on Windows. For windows there is capture.zip found in the archive but it's only Windows. Since it's possible on Windows and Unix, to be included in std lib it needs to work on both major platforms. Jim has popen() for Linux wrapped already (something he had done a while ago).
So, making it all work together does not seem to be a hard thing and it's certainly worth while for std lib inclusion.
Jeremy
I just finished capture.eu (basically the same interface as capture.ew but with posix underneath instead of w32api). However the capture library suffers from the limitation that only one process can be popened at a time.
My original pipeio library was more generic than this and allowed for as many processes as the system supported.
My attempts to contact CoJaBo about this do not elicit a response. So until we get someone who knows how to fix the limitation in capture.ew or has a separate popen library for windows I'm going to recommend against.
capture.eu is available at http://linuxbuddhist.net:8080/capture.eu
pipeio is available from the archives.
24. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 1029 views
- Last edited Jul 11, 2008
It's easy enough. I use that module and it turns http://cklester.com into http://www.cklester.com for SEO purposes.
Hm, have you tried to do anything advanced with it? It's pretty easy to stump the Apache list or the IRC channel.
Please note that
http://openeuphoria.org/EUforum/index.cgi
and
http://www.openeuphoria.org/EUforum/index.cgi
provide a different set of links that are not considered the same to search engines (click on those links and you'll see).
Yes, the host name needs fixed. I have not touched the web config, but you shouldn't need mod_rewrite for that, that's a bit of an overkill, no?
Jeremy Cowgar
25. Re: Euphoria web server
- Posted by Mike777 Jul 10, 2008
- 975 views
- Last edited Jul 11, 2008
We've all spent more time than we care to poring over mod_rewrite. OK, maybe only those of us who take advantage of certain features. But anybody who has fiddled with any form of CMS knows the value of mod_rewrite. Or those who have tried to set up multiple websites from a constant core set of pages. Or probably any of the gazillion other voodoo like results one can achieve with Apache, but not with almost anything else.
I can't imagine deploying something that isn't on a site with mod-rewrite in effect.
I guess if you are intending to deploy something that is independent of mod_rewrite that it doesn't matter how you develop.
But for me, I'd prefer to develop in an environment which closely mimics, if not replicates the deployment environment.
I can certainly see the value in a light overhead if the application will not interact with the webserver in any meaningful manner.
Mike777
26. Re: Euphoria web server
- Posted by Jeremy Cowgar Jul 10, 2008
- 981 views
- Last edited Jul 11, 2008
I can't imagine deploying something that isn't on a site with mod-rewrite in effect. I guess if you are intending to deploy something that is independent of mod_rewrite that it doesn't matter how you develop.
Hm, all the web servers I mentioned, with the exception of euweb because I have not seen it, all have URL rewriting just as capable as Apache's, but much simpler and many times faster. Apache really just hit the market at the right time with the right backing. That's why they are booming today.
But for me, I'd prefer to develop in an environment which closely mimics, if not replicates the deployment environment.
It's best if your app can run under any web server, so the ability to mimic the deployment is not too high on my priority list. When you use a web framework, for instance dare I say Ruby on Rails, you can be confident that it'll deploy under a boat load of servers. That would be the goal of any euphoria web framework I'd create.
Jeremy
27. Re: Euphoria web server
- Posted by euphoric (admin) Jul 11, 2008
- 988 views
It's easy enough. I use that module and it turns http://cklester.com into http://www.cklester.com for SEO purposes.
Hm, have you tried to do anything advanced with it? It's pretty easy to stump the Apache list or the IRC channel.
No. I've only tried the domain www redirect thingie.
I have not touched the web config, but you shouldn't need mod_rewrite for that, that's a bit of an overkill, no?
Well, I don't know if there's another way. So... and it can't be considered overkill when it's just 3 lines in an htaccess file.
28. Re: Euphoria web server
- Posted by Andy Drummond Jul 11, 2008
- 922 views
I have used Abyss Web Server, is a small download freeware to host one domain, to host more you must to buy the full version, runs on WIN and Linux version, can run Euphoria programs as CGI without previous compile. I have run QBasic as CGI on it www.aprelium.com
Thanks Marco. I have that installed and I can communicate with it, which must be the major hurdle. If I can crack how to effect CGI apps then we are well away.
I am in touch also with Louis Bryant about his Euphoria web server and I am hoping I can get that going, because it is as simple as I am and just what I want without too much understanding being necessary.
So I should get something going OK, and so thanks, guys, for all your (mostly incomprehensible) help!
Andy
29. Re: Euphoria web server
- Posted by mic Jul 11, 2008
- 957 views
I have used Abyss Web Server, is a small download freeware to host one domain, to host more you must to buy the full version, runs on WIN and Linux version, can run Euphoria programs as CGI without previous compile. I have run QBasic as CGI on it www.aprelium.com
Thanks Marco. I have that installed and I can communicate with it, which must be the major hurdle. If I can crack how to effect CGI apps then we are well away.
I am in touch also with Louis Bryant about his Euphoria web server and I am hoping I can get that going, because it is as simple as I am and just what I want without too much understanding being necessary.
So I should get something going OK, and so thanks, guys, for all your (mostly incomprehensible) help!
Andy
Abyss is what I used when was hosting my own stuff. It was easy to get up and running and installing PHP support for.