Jump to content

the DtTvB's AutoIt Web Server


the DtTvB
 Share

Recommended Posts

This is my new web server, I don't know what should be its name, so here is it: the DtTvB's AutoIt Web Server. :mad:

:oCurrent Features:

  • Folder Index (index.html, etc.)
  • Configurable Document Root (default is public_html)
  • Customizable Error Page
  • MIME Choosing (for each file type)
  • Access Log
  • File Indexing (showing the list of file when index file is not found) [done by Spyrorocks]
  • Preprocessor (yay it's finished, you can now run AutoIt script in it to make some services) [done by Spyrorocks]
  • File chunking, so it takes not so much RAM. [done by piccaso]
  • Header Processing [svn]
  • Configuration in a seperate file [svn]
:)To-Do and Ideas..
  • Output Compressing (using Zlib)
  • POST method support
  • etc, etc, etc.
:nuke:Demo Site: http://dttvb.yi.org:27643/

:lmao:The program may have bugs, if you found runtime-errors, please report! Please include the error message, file, and line number where it caused the error, and be sure to check the feature list first!

:DSteal Get the code from the SVN.

Scroll down to get the release.

In SVN, the code is at the latest revision, but the code may be unstable.

The code is at http://opensvn.csie.org/DtTvBs_httpd/

If you don't know how to obtain the code from it, I have some guide..

  • First, download TortoiseSVN
  • Install it.
  • Open Windows Explorer.
  • Create a folder somewhere.
  • Get in to that folder.
  • Right click the blank space, and click SVN Checkout
  • A checkout dialog appears.
  • Change the URL of the repository.
  • Press OK.
  • You will see the progress dialog.
  • Wait until it finishes.
  • Press OK.
  • Go back to your folder.
  • Arragh!! The code is there! It must be magic!!
Note that when you edit the code, the ! sign shows over the file you modified. This is normal, so you don't have to worry.

;)Source Code and Changelog:

  • Version 1.2 with more piccaso's add-ons (A huge thanks!) WebServer_1.2_Piccaso_3.zip- Fixed some problems with async.dll (v0.5)

    - Added some mime types

    - Added 'Content-Length' Header for file indexing

    - Changed spyro's Preprocessor for @autoitexe compatibility (Apzo's first idea)

  • Version 1.2 with piccaso's fix WebServer_1.2_Piccaso.zip- This one is safer, so please download this one instead of one below. Thank you very much, piccaso! If you still wanted to try the older version, you still can choose below.
  • Version 1.2 Web_Server_1.2.zip- It's the release after 1.1 and before 1.3

    - Query string support

    - Directory indexing [spyrorocks]

    - Preprocessor [spyrorocks]

    - Enviroment variables support (for preprocessing)

    - More whitespaces (yeah, it's easier to read)

    - More comments

    - error.html is moved into the templates\error folder! If you have modified it, please move it into templates\error folder!

  • Version 1.1 Web_Server_1.1.zip- Release 1.1

    - File Chunking [piccaso]

    - Better URL handling [theguy0000]

  • Version 1.0 Web_Server.zip- Initial Release
This program is still under development, so please contribute if you can!

:evil:How to use?

  • Get the latest source code above.
  • Extract it into a folder.
  • Right click "server.au3" and select "Edit Script"
  • Change the configuration, just close it if you don't want to change.
  • Run the script "server.au3"
  • Try going to "localhost:port" where port is the value of $listenPort
  • In case you haven't change anything, try clicking here to test.
  • If a page shows up, congratulations, you sucessfully installed it!
  • You may now change the contents in your web folder, such as public_html
:oNote: You can configure the server at server.conf. For 1.2 or olderm configure at server.au3 Edited by the DtTvB
Link to comment
Share on other sites

  • Replies 171
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Test Page is down.

Can't test right now. I'm on Fedora.

Looks good though!

I'm on Fedora now, too! Yay! lol

this looks really good. I wanna make my own now. lol

nice job, the test pages look great, I will explore it in detail tomorrow.

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

I just love this!

Thanks, i will learn alot of it!

EDIT: take a look at this: http://www.autoitscript.com/forum/index.php?showtopic=34094

Edited by Pakku
Link to comment
Share on other sites

Yeah, I took a look at it already, what's with it?

And ahh, nothing new since the last post of that topic is still mine! :S!

;)Learn more about HTTP at HTTP Made Really Easy

Edited by the DtTvB
Link to comment
Share on other sites

well, maybe you can put it in the webserver as a standaard

Edited by Pakku
Link to comment
Share on other sites

I think it would be really superhard to comply with the standard. It has too much rules, I think.

D-Generation X: Here's for Ubuntu and here's for Fedora.

Edited by the DtTvB
Link to comment
Share on other sites

I don't exactly know. But I think it should.

I ran Firefox 2.0 for Windows on Linux and it perfectly works, and I saw people using Office 2003 on Linux, strange isn't it?

;)The next thing to do is... processing headers...

It should process the following:

  • QUERY_STRING (This is an env variable, not header!)
  • REMOTE_ADDR
  • SCRIPT_NAME
  • SERVER_SOFTWARE (very easy one!)
  • SERVER_NAME (like host)
  • SERVER_PROTOCOL (just set it to HTTP/1.1 and it's finished, blah!)
  • SERVER_PORT
  • Content-Length (hard one!)
  • Cookie
  • Host
  • User-Agent
And then make it accept POST requests...

POST request is tricky one, I think.

Link to comment
Share on other sites

Hmm, If I were you, I would take out lines 67 and 68 and replace them with this

$url = StringRegExpReplace ($requestSplitted[1], "(?i)get\s+(\S+)\s+http/\d.\d", "\1")

That should give you a URL, and a bit more compatibility.

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

This is my new web server, I don't know what should be its name, so here is it: the DtTvB's AutoIt Web Server. ;)

maybe Ahttpd ?

this is the best autoit based webserver i have seen!

This program is still under development, so please contribute if you can!

i'll try :lmao:

i added better handling for large files, and some little changes i don't remember (see comments)

did you ever try to serve off a 700 mb file off your server?

it loads it all into memory before sending it out :evil:

edit: *Snip*, save space..

of course the server is busy serving a large file so it cant handle other requests.

so i tryed to write a load balancer, but i didnt finish it yet.

A really nice piece of code, and nice page design too :mad:

Edited by piccaso
CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
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...