Skip to content

WWW Pages

The websites at Serv00.com are powered by an efficient NGiNX server. Additional modules allow you to use the "standard" .htaccess - you can easily edit rewrite rules or autoindex templates. And the proprietary solution of the ADMIN.NET.PL company - a transparent cache ensures an amazing speed of loading pages.

One account at Serv00.com allows you to host more than one website. Configuration is possible using the DevilWeb webpanel and by SHELL using the devil www module.

DevilWEB

After logging in to the administration panel the configuration of websites can be found in the WWW websites tab. A list of already added websites will appear after clicking.

Info

After adding the main domain, it is possible to add subdomains. To do this, enter the full name of the subdomain in the Domain field. For example, when adding the statistics subdomain to the example.com domain, enter statistics.example.com in the Domain field.

WWW pages list

To add a page, click the + Add new website tab. The following menu will appear.

Add new WWW page

PHP

To add a PHP type page (or one that uses CGI) enter the domain name and then click the add button. After adding the site in Details, you can turn on GZIP compression, force SSL, allow the execution of PHP functions: eval(), exec(), select Open Basedir directories limiting script access PHP sites to the given directories.

Python

To add a Python page, click advanced settings, enter domain name and select Python page type. Then select the Python binary (interpreter version) and the Environment. If the hosted application needs a separate environment, configure virtualenv, then select Other directory from the drop-down list and then select the path to the python executable, for example /usr/home/login/python3/bin/python.

Ruby

Warning

Before adding a page of type Ruby, configure RVM or compile Ruby yourself

To add a Ruby page click on advanced settings, enter domain name and select Ruby page type. Then select the Ruby binary and the Environment.

Node.js

To add a Node.js page, click advanced settings, enter the domain name and select the Node.js website type. Then you need to select the Node.js binary already installed on the server or self-compiled and the Environment.

Proxy

To add a Proxy page, click on Advanced Settings, enter domain name and select Proxy page type. As the proxy target, select the Serv00.com server and reserved port or the previously created GIT, SVN or HG repository. The proxy page supports websocket to the application running at the target. If the application on its port provides communication via the HTTPS protocol then the HTTPS option should be selected.

Warning

The proxy page will not work (an error message 502 will appear) if you select the HTTPS option when the target application on its port does not support the HTTPS protocol but only HTTP. This option should not be confused with the force SSL website option which can be activated separately in the page details.

Pointer

To add a Pointer page (pointer to another page) click advanced settings, enter domain name and select Pointer page type. You should choose an embedded or your own website as the pointer target.

Devil

Configuration of websites is also possible from the SHELL using the devil www module.

Adding and removing domains

Adding a domain is possible with the command devil www add DOMAIN [type] where the arguments are:

  • DOMAIN - domain name,
  • type - Website type: php, python, ruby, nodejs, proxy, pointer.
  • For types python, ruby and nodejs you must provide the path to the executable file and the configuration environment (production, staging, development or test).
  • In the case of the proxy type specify the proxy target address.
  • For the pointer type - an existing non-pointer page must be provided.

Warning

If the application on its port listens with the HTTPS protocol, when adding a proxy page, its address should be preceded by https://. The page of the proxy type will not work (error message 502 will be displayed) if the HTTPS option is selected, while the target application on its port is not listening with HTTPS protocol but HTTP. This option should not be confused with the force SSL website option which is available as devil www options DOMAIN sslonly on.

Removing a domain is possible with the command devil www del DOMAIN.

It is also possible to:

  • force redirect to HTTPS: devil www options DOMAIN sslonly on|off
  • enable/disable GZIP compression: devil www options DOMAIN gzip on|off
  • enable/disable PHP eval() function: devil www options DOMAIN php_eval on|off
  • enable/disable PHP exec() related functions: devil www options DOMAIN php_exec on|off
  • open_basedir setting for PHP: devil www options DOMAIN php_openbasedir directory:directory2:... (default directories will always be added)
  • settings cache: devil www options DOMAIN cache control|short|long|purge|off anddevil www options DOMAIN cache_cookie any|none|name
  • settings WAF: devil www options DOMAIN waf 0|1|2|3|4|5
  • protection against attacks based on blacklists: devil www options www_domain blacklist 0|1|2|3|4
  • limit of running processes (for pages type: Python, Node.js, Ruby): devil www options DOMAIN processes 1+

Examples

A listening program is running on the TCP port 12345 on the server. In order for the user visiting the website proxy-example.com to receive pages generated by this program, a proxy domain must be created on the local server, port 12345. For example, in the console, enter:

devil www add proxy-example.com proxy localhost 12345

Proxy to a specific address on the running server http://127.0.0.1:12345/application/:

devil www add proxy-example.com proxy localhost 12345 /application

Domain restart

To restart an application running as page type: python, nodejs or ruby use the command devil www restart DOMAIN

Process limit for Phusion Passenger

It is possible to set the number of processes for pages type: python, nodejs and ruby. Command syntax: devil www options DOMAIN processes QUANTITY

Where:

  • DOMAIN - means a WWW domain of the type python, nodejs or ruby.
  • QUANTITY - number of processes in the range from 1 to 80% of the system processes of the hosting account.

The option is also available in the DevilWEB webpanel:

WWW Websites ➡ Details ➡ Number of processes ➡ Enter a new value and save the changes with the Save changes button.