Jump to content

Webbased AU3 on LightTD


ptrex
 Share

Recommended Posts

Webbased AU3 on LightTD

It' s been a long time since I found what I was looking for.

We all know the existance of the AuCGI Handler created by "theguy0000". :)

Which makes AU3 a nice scripting tool, enabling you to make webpages using existing AU3 scripts + HTML.

Between 2006 and now I was still looking for a webserver that could work together well with this CGI handler.

And of cource would be a good marriage with AU3.

I have tested several webservers. But either they could not start the AuCGI Handler, or the where to skinny, or the heavy, or ...

I have tested IIS, APACHE, ABYSS? sHTTPD, TINY Webserver etc.

And I found what I was looking for in the LightTD webserver.

OK it's not that I am on a diet or so, always bringing up "light" stuff. But it is accidently the better software that goes with AU3.

(Only the best is good enough for AU3 !!).

What is LightTD? (pronounce lighty).

Security, speed, compliance, and flexibility -- all of these describe lighttpd which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. And best of all it's Open Source

And this is only a limited description of what it has to offer. It has been adopted by famous sites.

lighttpd powers several popular Web 2.0 sites like YouTube, wikipedia and meebo. Its high speed io-infrastructure allows them to scale several times better with the same hardware than with alternative web-servers.

- LightTD is running on Windows and Linux.

- It does not need to be installed (runs as standalone EXE)

- Runs even from a thumb drive if needed.

- Easy configurable.

- Fast (faster than Apache it seems !!)

- SSL

- Optimized for FLV streaming

- ...

Where can you find it ?

Look here to download : LightTD for Windows

How to use it withAU3 ?

1. After downloading it, extact it. And put in you C:drive. Like this : C:LightTPD.

2. Create and extra folder in C:LightTPD called AU3. like this C:LightTPDau3.

3. Copy the CGI Handler in there C:LightTPDau3AuCGI.exe

4. Replace the Config file in the C:LightTPDConf folder with this one lighttpd_inc.zip

5. Put these test files in the root folder of the webserver C:LightTPDhtdocs htdocs.zip

6. Use this command to start it. Put it in a start.bat file.

@ECHO OFF
ECHO LightTPD Start mode (with log)
ECHO Press 'CTRL + C' to exit.
ECHO.
ECHO LightTPD Output:
ECHO ----------------
cd C:LightTPD
START /B lighttpd.exe -f conflighttpd-inc.conf -m lib

7. Don't close the CMD window because this is where you will see ERRORS appear when started.

The config file also expects you to have PHP installed in C:Program FilesPHP.

If not you will to blank out some lines in the Config file.

I have tested and it runs like a charm, using AU3 and PHP at the same time.

FAQ's

Q1.How do I show that it is working?

A. you have to create a Start.bat file with, the command in it, explained in step 6.

Q2. What can I run on it?

A. Once it is started you have a webserver running that can be accessed by any browser

Once it runs it shows a black CMD window with the status of the webserver.

Q3. How do I set something up to see?

A. Go to http://localhost:8080/index.html

A. Or try http://localhost:8080/index.au3

Q4. How do I connect to it from local machine?

A. see Q 3.

Q5. How do I connect to it from other machine?

A. See 2 -> http://IPADDRESS_OF_YOUR_MACHJINE:8080/index.html

Q6. How do I connect to it from other location?

A. See Q 5.

Q7. Are there any example scripts to show?

A. Yes, See step 5 of the explanation.

Enjoy !!

ptrex

Edited by ptrex
Link to comment
Share on other sites

Very cool! I'll have to check this out after school... a standalone web serv er. Now that could be cool :)

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Link to comment
Share on other sites

@theguy0000

It would be good to get your input on this !!

By the way in your previous comment on AuCGI you said that POST was not working.

Is that still the case ?

Regards

ptrex

Erm, yes, sorry.

AuCGI is a middle program between the server and autoit. The POST is sent from the server to AUCGI, then AUCGI to the autoit script. However, somewhere in that process, the POST data just isn't being sent.

edit: ugh, looking back, I can barely understand my own code. This is what comes from using variables such as $run and $bleh_title... Also "#region do stuff" isn't too helpful either.

Now I'm going to have to go back, interpret, and comment my own code.

THis should be fun...

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Hehe. I change absolutely nothing and POST all of the sudden works. Although I'm not complaining.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

@theguy0000

Thanks for the feedback.

I realy value your feedback on this.

Are planning to release a new clea,ned up version ?

Because I would like to rework this CGI handler to run against ASP (Vbs) code.

But trying to figure out someone elses code is more time consuming, this looking through a more structuer code.

If you just could do this little clean up job that woult be great.

I might even expand the CGI handler functionality if needed.

Because I read a lot about FastCGI, but I don't have a clue yet what the differences are.

regards

ptrex

Link to comment
Share on other sites

Hello !

I've tested sHTTPD and it works great too.

Moreover, all af the configuration options can be passed to the exe in the command line, allowing a .au3 script to launch it without any conf file, juste shttpd.exe

@ theguy0000 : excellent !

[Edit] sHTTPD is minimalist, but can be emedded with FileInstall() [/edit]

Apzo.

Edited by Apzo
Link to comment
Share on other sites

Thanks,

But I seem to have a server running;

LightTPD Start mode (with log)

Press 'CTRL + C' to exit.

LightTPD Output:

----------------

2008-03-19 23:41:19: (log.c.75) server started

1. How do I show that it is working?

2. What can I run on it?

3. How do I set something up to see?

4. How do I connect to it from local machine?

5. How do I connect to it from other machine?

6. How do I connect to it from other location?

7. Are there any example scripts to show?

[in absolute blankness,]Best, randall

Link to comment
Share on other sites

Link to comment
Share on other sites

@randallc

1. How do I show that it is working?

2. What can I run on it?

3. How do I set something up to see?

4. How do I connect to it from local machine?

5. How do I connect to it from other machine?

6. How do I connect to it from other location?

7. Are there any example scripts to show?

[in absolute blankness,]Best, randall

1. you have to create a Start.bat file whit the command in it explained in post 1 step 6.

2. Once it is started you have a webserver running that can be accessed by any browser

Go to http://localhost:8080/index.html

3. See 2 -> Or try http://localhost:8080/index.au3

4. See 2 -> http://IPADDRESS_OF_YOUR_MACHJINE:8080/index.html

5. See item 4

7. Yes, See my post 1 step 5

randallc,

These are good questions. I will put the FAQ in the first post.

Assuming that you are not the ony one having questions.

regards

ptrex

Link to comment
Share on other sites

When I run the .au3 index from my browser, I get a bunch of errors (msgbox errors) then the page goes pure white.

Error:

Line 4 (File "C:\WINDOS\AuCGI\index.au3"):

#include <Web.au3>

Error: Error opening the file.

Got the latest autoit, and the latest beta.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

4. See 2 -> http://IPADDRESS_OF_YOUR_MACHJINE:8080/index.html

5. See item 4

7. Yes, See my post 1 step 5

ptrex

Thanks again;

All work except "http://124.171.104.168:8080/index.au3" from local machine, or across Internet. [where 124.171.104.168 is say, currrent IP address on server; does it need a password script or something to log on acrooss the internet?]

What is wrong with that?

Best, Randall

PS I also get the blank message box before the html opens; where is that coming from?

Edited by randallc
Link to comment
Share on other sites

@Firestorm

This seems that when running it, it looks for the Web.au3 include file ?!

Which it should NOT do. Because this is included in the AuCGI.exe.

Are you sure you have put the EXE in the AU3 folder and not the AuCGI.AU3 (AU3) file !!

See instructions of the first post again, where you missed something.

regards

ptrex

Link to comment
Share on other sites

@randallc

Accross the internet lot's of ohter factors come in place.

Do you have a firewall installed, do you have a router installed, do you use a proxy, ....

A normal webserver is listening on port 80. But by default I configured it to run on 8080.

Because I have also an other webserver running on port 80, which is the default IIS on XP Pro.

If you don't have any other server running than change the Config file, where is says Port 8080 to port 80.

I hope this helps.

regards

ptrex

Link to comment
Share on other sites

@randallc

Accross the internet lot's of ohter factors come in place.

Do you have a firewall installed, do you have a router installed, do you use a proxy, ....

A normal webserver is listening on port 80. But by default I configured it to run on 8080.

Because I have also an other webserver running on port 80, which is the default IIS on XP Pro.

If you don't have any other server running than change the Config file, where is says Port 8080 to port 80.

I hope this helps.

regards

ptrex

thanks, OK

I'll try..

Best, Randall

Link to comment
Share on other sites

  • 8 months later...

I managed to get the web server up and running, I can view index.html. However, when I tried to view index.au3 i get this error from Lighttpd

5 [sig] lightpd 3612 _cygtls:: handle_exceptions: Error while dumping state (probably corrupted stack)
DATETIME: (mode_cgi.c.1244) cleaning up CGI: process died with signal 11

I am wondering if AutoCGI.exe has a log to help me diagnose the issue.

Thanks for your help.

Link to comment
Share on other sites

  • 3 years later...

So bearing the risk of being a necro here, I've recently come across a need for this and just can't seem to get it to work. Here is the error I'm recieving. Not really all that familar with webservers and a few hours of playing around with things has wielded no results. On Win 7 64bit.

C:LightTPD>2012-07-07 22:30:02: (plugin.c.169) dlopen() failed for: lib/mod_ind
exfile.dll No such file or directory
2012-07-07 22:30:02: (server.c.694) loading plugins finally failed

Edit: I know I got this to work a few years ago that was using the AutoIt.me instructions, but since that site is down my searching led me to this thread. However I assume the steps are the same?

Edit2: And of course as soon as I post here I get it working. Go figure amiright? For anyone else running into this problem I simply edited the default config file to the style of the one included here.

1. Uncomment the "mod_cgi" line near the top of the file.

2 Change the mod_cgi section near the middle to:

#### CGI module
cgi.assign = ( ".au3"  => "C:/Workspace/AU3/AuCGI.exe" )
Edited by BillLuvsU

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...