All Projects → DannyArends → Danode

DannyArends / Danode

Licence: gpl-3.0
Small and flexible web server written using the D 2.0 language

Programming Languages

d
599 projects
dlang
54 projects

Projects that are alternatives of or similar to Danode

Criollo
A powerful Cocoa web framework and HTTP server for macOS, iOS and tvOS.
Stars: ✭ 229 (+358%)
Mutual labels:  standalone, framework, webserver
easy-shell
A pure Python script to easily get a reverse shell
Stars: ✭ 48 (-4%)
Mutual labels:  ssl, webserver
Kvantum
An intellectual (HTTP/HTTPS) web server with support for server side templating (Crush, Apache Velocity and JTwig)
Stars: ✭ 17 (-66%)
Mutual labels:  ssl, webserver
Restana
Super fast and minimalist framework for building REST micro-services.
Stars: ✭ 341 (+582%)
Mutual labels:  framework, webserver
Asio2
Header only c++ network library, based on asio,support tcp,udp,http,websocket,rpc,ssl,icmp,serial_port.
Stars: ✭ 202 (+304%)
Mutual labels:  standalone, ssl
Laravel Zero
A PHP framework for console artisans
Stars: ✭ 2,821 (+5542%)
Mutual labels:  standalone, framework
Pode
Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
Stars: ✭ 329 (+558%)
Mutual labels:  framework, webserver
Pure Http
✨ The simple web framework for Node.js with zero dependencies.
Stars: ✭ 139 (+178%)
Mutual labels:  framework, webserver
Polaris
A cross-platform, minimalist web framework for PowerShell
Stars: ✭ 464 (+828%)
Mutual labels:  framework, webserver
Telegraph
Secure Web Server for iOS, tvOS and macOS
Stars: ✭ 474 (+848%)
Mutual labels:  ssl, webserver
Beetlex
high performance dotnet core socket tcp communication components, support TLS, HTTP, HTTPS, WebSocket, RPC, Redis protocols, custom protocols and 1M connections problem solution
Stars: ✭ 802 (+1504%)
Mutual labels:  ssl, webserver
Python Mocket
a socket mock framework - for all kinds of socket animals, web-clients included
Stars: ✭ 209 (+318%)
Mutual labels:  framework, ssl
Blink
A high performance web framework and application server in PHP.
Stars: ✭ 837 (+1574%)
Mutual labels:  framework, webserver
bmcweb
A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Stars: ✭ 109 (+118%)
Mutual labels:  ssl, webserver
Shackle
High-Performance Erlang Network Client Framework
Stars: ✭ 163 (+226%)
Mutual labels:  framework, ssl
httpsify
a transparent HTTPS termination proxy using letsencrypt with auto certification renewal
Stars: ✭ 107 (+114%)
Mutual labels:  ssl, webserver
Twig
Twig - less is more's web server for golang
Stars: ✭ 98 (+96%)
Mutual labels:  framework, webserver
Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+2686%)
Mutual labels:  framework, webserver
Cppwebframework
​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
Stars: ✭ 348 (+596%)
Mutual labels:  framework, webserver
Webcpp
用C++开发web服务器框架
Stars: ✭ 23 (-54%)
Mutual labels:  framework, webserver

DaNode - A secure and small footprint web server for D

master: Build Status development: Build Status licence: license

Web server written in the D programming language to host server side web applications (written in any programming language) on multiple domains. It provides encrypted HTTP content over SSL using Server Name Identification, and has been battle tested in production for over 5 years hosting several of my web domains, such as my own personal website.

Written because I was looking for a quick way of sharing Rscript output with other researchers at different universities. Once working I wanted to use other programming languages as well and added generic support for other languages. Use any language to write your SSL encrypted homepage, why not brainfuck, however Ada, R or PHP are also fine.

The web servers main features / aims summarized:

Get DaNode

Install the DMD compiler from https://dlang.org/

Clone the source code from Github

git clone https://github.com/DannyArends/DaNode.git
cd DaNode

Build DaNode using the dub package manager

dub build

Another option is to compile using the compile script

./sh/compile

Start the web server at a specific port (e.g. 8080)

./danode/server -p 8080

Confirm that the web server is running by going to: http://localhost:8080/

Enable HTTPs support

To compile the server with HTTPS support (binds to port 443), use dub and specify the ssl configuration:

dub build --config=ssl

or, compile using the compile script:

./sh/compile ssl

Start the web server on port 80 and 443:

./danode/server

After starting the server, confirm that the web server is running by going to http://127.0.0.1/ and https://127.0.0.1/ and make sure you have enough user rights to bind port 80 and 443, a server private key and domain certificates are required. I use Let's Encrypt to secure my own homepage. Setup instructions for Let's Encrypt can be found in the sh/letsEncrypt file.

Troubleshooting: [ERROR] unable to bind socket on port 80

Starting the server on port 80 and 443 might fail, when you do not have appropriate rights on the system. First check if you can start the server on another port:

./danode/server -p 8080

I use nohup and authbind to start the web server in deamon (background) mode at port 80, and 443 (SSL). First, install nohup and authbind via your package manager, configure authbind to allow connections to port 80 (and 443, when using the ssl version), then start the webserver by running:

./sh/run
Command-line parameters

The content of the ./sh/run shell script:

nohup authbind danode/server -k -b 100 -v 2 > server.log 2>&1 &

This starts the server, does not allow for keyboard command (-k) has a backlog (-b) of 100 simultaneous connection (per port), and produces more log output (-v 2).

      --port      -p       HTTP port to listen on (integer)
      --backlog   -b       Backlog of clients supported simultaneously per port (integer)
      --keyoff    -k       Keyboard input via STDIN (boolean)
      --certDir            Location of folder with SSL certificates (string)
      --keyFile            Server private key location (string)
      --wwwRoot            Server www root folder holding website domains (string)
      --verbose   -v       Verbose level, logs on STDOUT (integer)
Example websites

See the www/ folder for a number of example web sites. After compiling the web server, run the web server and the www/localhost/ folder is available at http://localhost/ or http://127.0.0.1/ from the browser. For the other examples in the www/ folder you will have to update your hosts file.

Create a PHP enabled website

To create a simple PHP enabled web site first download and install DaNode, the next step is to create a directory for the new website, by executing the following commands from the DaNode directory:

mkdir www/domain.xxx
touch www/domain.xxx/index.php

Add some php / html content to the index page, and create a web.config file:

touch www/domain.xxx/web.config

Add the following configuration settings to the web.config file, if you want to use scripting languages such as PHP, you have to manually allow the execution of cgi file. Add the following lines in your web.cofig file to redirect to the index.php file, and allow the webserver to execute the php script, and redirect the incomming requests to the index.php page:

allowcgi     = yes
redirecturl  = index.php
Update the hosts file

If you do not own the domain name you want to host, use the /etc/hosts file to redirect requests from the domain name to your local IP address using the hosts file:

sudo nano /etc/hosts

Then add the following lines to this hostfile using your favourite editor:

127.0.0.1   domain.xxx
127.0.0.1   www.domain.xxx

Save the file with these lines added, then open a browser and navigate to: http://www.domain.xxx, you should now see the content of your php / html file.

Supported back-end languages

Languages with supported APIs: PHP, PYTHON, D, R

See: api/README.md

Contributing

Want to contribute? Great! Contribute to DaNode by starring or forking on Github, and feel free to start an issue or sending a pull request.

Fell free to also post comments on commits.

Or be a maintainer, and adopt (the documentation of) a function.

License

DaNode is written by Danny Arends and is released under the GNU GENERAL PUBLIC LICENSE Version 3 (GPLv3). See LICENSE.txt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].