Phis server

From PhiWiki
Jump to: navigation, search

The Phis server is mainly designed for a fast service of Phi pages for the intranet or useable as a local service for testing and evaluating. However it represents a fully functional Web server. Beside Phi pages Phis can serve normal HTML pages and other media types.

Overview

The Phis server itself is basically not designed for the web. Use the Apache module instead. This is because of Phis is not tested against attacks like denial of services and other miss behavior but fits excellently into intranet or testing environments. Phis also works in a IPv6 address space.

Since v1.5.0 the server functionality can be extended with C++ run time Server modules which can provide your own JavaScript objects.

Installation

Windows

Phis is part of the Phisketeer distribution. Simply follow the steps of the Phisketeer-Win32-x_x_x.exe installer.

Linux

On Linux Phis is included in the self extracting binary package. You may specify the binary pathes during installation.

Solaris

Please contact us directly or compile the code by yourself.

Mac OS X

AppStore

Since v1.4.0 Phisketeer is also available in the Mac AppStore: watch out for Artephis. Apple requires some restrictions for Apps in the AppStore, especially for server applications, so if you really want to use a full featured Phisketeer installation (i.e. using VIDEO in WebKit) use our provided package on the Phisketeer download page.

Packaged distribution

Phis is automatically installed on Mac OS X during package installation from the .dmg image. By default Phis is listening on port 8080 and started as a daemon on Artephis editor startup.

Phis daemon

After installation you find the daemon at the following location:

/Applications/Artephis.app/Contents/MacOS/phis

You can start the configuration program for Phis out of the Artephis Preferences menu or run /Applications/Artephis.app/Contents/MacOS/phisconf manually.

Configuration

Windows

In Windows Phis uses the Windows registry for storing its configuration. You need to start Phisconf if you want to change the Phis service configuration.

Unix/Linux

The settings are stored in /etc/xdg/Phisketeer/phis.conf prior version 1.5.0 and /etc/phi/phis.conf for recent versions.

Run sudo path_to_phisketeer/bin/phisconf for a graphical user interface for Phis.

Mac OS X

In Mac OS X Phis uses the ~/Library/Preferences/com.phisys.* files to store the settings and the AppStore (sandboxed) version uses ~/Library/Containers/com.phisys.artephis/*

Since v1.4.0 you can start the configuration directly out of Artephis from the Preferences dialog.

Configuration settings

The configuration uses domain names as subkeys to be recognized by the service with the keys DocumentRoot and TempDir. Serving different domain names should use different pathes for the two keys above. However you may use the same keys if you want to serve the same pages, ie. for localhost and 127.0.0.1.

Admin

The server admin's email address.

admin@localhost

BaseDir

The default base directory of all hosted domains.

/var/phis/default - Unix/Linux
C:\Program Files\Phisketeer\data\default - Windows 32bit
C:\Program Files (x86)\Phisketeer\data\default - Windows 64bit
~/Documents/localhost - Mac OSX (prompted on first Artephis launch)

Index

Pages recognized as index pages if directories are requested.

index.phis,index.html,index.htm

KeepAlive

Time in msec to keep a connection alive.

ListenerIF

Listener interface IP address or keyword Any. IP addresses can be noted as IPv4 or IPv6 addresses.

ListenerPort

Port the service is listening on. This is usually 80 or 8080.

LogDir

The log directory. Consult the error.log to find server problems. The default locations are:

/var/phis/default/log/error.log - Unix / Linux
C:\Program files\Phisketeer\data\default\log\error.log - Windows 32bit
C:\Program files (x86)\Phisketeer\data\default\log\error.log - Window 64bit
~/.phis/log/error.log - Mac OS X
~/Library/Containers/com.phisys.artephis/Library/Data/Cache/log/error.log - Mac OS X AppStore (sandboxing)

LogFilter

Filter code to prevent several entries from being logged.

MimeTypesFile

You may specify an own MIME types file here. Otherwise the builtin settings are used.

SSLCertificate

SSL root certificate file.

/var/phis/default/ssl/domain.crt - Unix / Linux
C:\Program Files (x86)\Phisketeer\data\default\ssl\domain.crt - Window 64bit

SSLEnabled

Enable SSL true|false.

SSLListenerIF

Listener interface IP address or keyword Any.

SSLListenerPort

Port the SSL service is listening on. This is usually 443.

SSLPrivateKey

Private key file. For security reasons this file should only be readable to the service process.

/var/phis/default/ssl/domain.key
C:\Program Files\Phisketeer\data\default\ssl\domain.key

Command line options

On Mac OS X the service is automatically started during the Artephis editor launch and also stopped on closing the editor.

phis

Starts Phis as a service (without registering it) or as a Unix daemon.

/opt/phisketeer-x_y_z/bin/phis - Unix/Linux
C:\Program Files\Phisketeer\bin\phis.exe - Windows 32bit
C:\Program Files (x86)\Phisketeer\bin\phis.exe - Windows 64bit
/Applications/Artephis.app/Contents/MacOS/phis - Mac OS X

phis -v

Prints out the current state of the server (ie. if the server is installed and/or running).

phis -t

Terminates the Phis Windows service.

C:\Program Files\Phisketeer\bin\phis.exe -t - Windows 32bit
C:\Program Files (x86)\Phisketeer\bin\phis.exe -t - Windows 64bit

Does nothing on other platforms.

phis -i

Registers Phis as a service in Windows. This is automatically done during installation if you mark the appropriate checkbox and started once after installation. However the auto start flag will not be set. If you want Phis starting automatically after booting the system, you can enable this with the Windows Service Controller (by setting the autostart flag).

C:\Program Files\Phisketeer\bin\phis.exe -i

Does nothing on other platforms.

phis -u

Unregisters Phis in Windows from the service database. This is automatically done during deinstallation.

C:\Program Files\Phisketeer\bin\phis.exe -u

Does nothing on other platforms.

phis -c

Invalidates all cached data. This may necessary if you add / change / remove Server modules. Background: Phis caches some elements of *.phis pages for faster access so if you made configuration changes restart the service or send an invalidate command to the service (or Unix daemon) or stop and start the service again:

/opt/phisketeer-x_y_z/bin/phis -c
C:\Program Files\Phisketeer\bin\phis.exe -c
C:\Program Files (x86)\Phisketeer\bin\phis.exe -c

On Mac OS X start the Phisconf application out of the Artephis Preferences menu.

Internet mime types

Phi uses the internet mime types application/x-phi and application/x-phis.