A simple Windows Webserver
for PHP and CGI Scripts

News

Feb 15, 2017

UTF8 / Unicode support for filenames and directories implemented.

Oct 27, 2016

A bigger update was released: WWebserver now can work with SSL/TLS 1.2, Virtual hosts, Cronjobs PHP 7.1.0 distribution for Win7+ is new default version. See below.

Nov 15, 2015

WWebserver with PHP 5.4.45 FastCGI released

FastCGI PHP support (PHP 5.4.45)
Also usable from command line (startable from USB devices)
4%-15% faster PHP execution than older version
Better handling of large files (Range support)

Links

Advertise:
Fix price Webhosting

What is this?

The Windows Webserver was developed for testing PHP and CGI/FCGI programs under Windows, without installing an Apache or IIS environment. The Webserver is easy to install and comes with buildin PHP 7.1.0 FastCGI support and SSL/TLS 1.2. It's freeware and was tested with common OpenSource applications like Wordpress, Joomla, Drupal, Typo3, Magento, phpMyAdmin, PIWIK, AWstats. It's like XAMPP - but much more smarter.

What is this not?

It's not a Webserver for big productive systems. It does not support User authentication and URL rewriting. This features are planned for next versions.

Installation and Configuration

1. Install complete program with PHP 7.1.0 (Win7+)
wwebserver_php_710_setup.exe (31.6 MB)

or with PHP 5.4.45 (WinXP+)
wwebserver_php_5445_setup.exe (16.5 MB)

Old versions (also for Windows 2000): here

Without using installer, extract following ZIP:
wwebserver_php_5445_cmd.zip (18.6 MB)

If you have trouble with ZIP version please install Microsoft Visual C++ 2008 Redistributable Package first here
Executables will install VC++ Redist package automatically.

2. Type in your Host, Port, Document Path and start it.

Windows Webserver for PHP and CGI Scripts
The default HTTP Port is 80, but you can choose any other Port if there is just running another Webserver on your system.
If you dont need SSL you can mark checkbox No HTTPS.

After starting you can close the window and
control the Webserver with the Taskbar Icon.
Windows Webserver for PHP and CGI Scripts

3. Open your Webbrowser and start your PHP application like:

http://localhost/index.php

Virtual Directories

You can define virtual directories to handle multiple document paths.
Therefore edit the following configuration file:

C:\WWebserver\cfg\vdir.txt

# Definitions of virtual directories
# <Path>;<Directory>
#
# Note: There must be an '/' on end of <Path>

pma/;C:\phpMyAdmin
typo3/;C:\typo3
drupal/;C:\drupal
wordpress/;C:\wordpress

You can start the applications now verry simple like: http://localhost/wordpress

Note: After changing vdir.txt please STOP and START Webserver again.

CGI Programs

You can define own CGI Programs for example Perl or Ruby.
Therefore edit the following configuration file:

C:\WWebserver\cfg\cgi.txt

# Definitions of CGI programs
# <Alias 1> <Alias 2> ...;<Full path to CGI program>
# <Alias 1> <Alias 2> ...;PHPBuildIn
# <Alias 1> <Alias 2> ...;PHPFCGI [<Full path to php-cgi.exe>]
# <Alias 1> <Alias 2> ...;FCGI <Full path to FastCGI program> | <IP>:<Port> or <Pipename>
# <Alias 1> <Alias 2> ...;FCGI <IP>:<Port> or <Pipename>

.php .php4 .php3;PHPFCGI
.rb;C:\ruby\bin\ruby.exe
.pl;C:\perl\bin\perl.exe

In this example we associate file extensions .rb with Ruby scripts and .pl with Perl scripts.
.php .php3 .php4 files are associated with PHP FastCGI support.

Note: After changing cgi.txt please STOP and START Webserver again.

PHP Configuration

You can control the PHP environment with the php.ini file:

C:\WWebserver\cfg\php.ini

You can enable/disable the PHP extension DLL's located in directory:

C:\WWebserver\ext

Note: After changing php.ini you have to EXIT and RESTART the Webserver.

Virtual Hosts

You can define virtual hosts. Therefore edit the following configuration file:

C:\WWebserver\cfg\vhost.txt

# [<unique name>=]<hostname1>[,<hostname2> ...];<Directory>
# You can create for every virtual host a own configuration directory: cfg/vhost/<hostname>
# Following configuration files can be overwritten: mime.txt, vdir.txt, cgi.txt, php.ini (only for FastCGI)

# Example
mydomain.com,www.mydomain.com;C:\MyDomain.com
mydomain2.com,www.mydomain2.com;C:\MyDomain2.com

SSL/TLS 1.2

WWebserver support TLS 1.2 per default (based on OpenSSL v1.1.0b). Self signed X.509 certificates (RSA 2048 Bits) are generated automatically for every hostname. You can install your own certificates in the following directory:

C:\WWebserver\cfg\ssl for public certificates

C:\WWebserver\cfg\ssl\key for private key files

Certificates and key files must have the following filename convention: <hostname>.crt, <hostname>.key

Note: Old Webbrowsers does not support TLS 1.2. You need modern Browser for HTTPS connections.
Self signed certificates are marked as insecure by most Webbrowsers.

Cronjobs

You can execute cronjobs with WWebserver. Crontab is organized like Linux crontab. Please edit following file:

C:\WWebserver\cfg\crontab.txt

# <min> <hour> <day> <month> <weekday> <url>|exec <cmd> [<resultfile>]
# Weekday: 1 = Mon, 0 = Sun


# In this example we call every 10 minutes a URL and save the result in cron_result.html
*/10 * * * * https://www.mydomain.com/program.php?param1=1&param2=2 cron_result.html


# In this example we execute a local program (wget.exe) on Saturday 23:00
0 23 * * 6 exec c:\wget.exe http://www.mydomain.com/program.php?param1=1&param2=2 -O cron_result_wget.html

Note: You dont need to restart Webserver after changing crontab.txt.

Server optimization

Number of parallel requests, timeouts can be set with following configuration file:

C:\WWebserver\cfg\speed.txt

Special files

You can lock access to specific directory and all sub directories simply by creating the following empty file:

forbidden

Command line options

You can see all command line options with --help:

C:\WWebserver\wwebserver_cmd.exe --help

Server administration panel

http://localhost/wwadmin/

Webserver administration panel


WWebserver is a project from Matthias Wiede - mwiede Software - © 2008-2016