Devil::WWW
Z MyDevil.net
WWW module is used to manage websited hosted on our account. The syntax is as follows:
- devil www add <domain> <type> - adds a domain. Correct types are: php, django, ror, fastcgi.
- devil www del <domain> - deletes a domain.
- devil www list - lists our domains.
- devil www ssl add <ip> <cert> <key> - Adds a SSL certificate cert and it's key. As cert and key you need to specify a valid certificate and key file, located in our home directory - it will be then copyied to our SSL config directory and bound to the ip address specified. This function requires a private IP address.
- devil www ssl del <ip> - removes a certificate from the ip specified
- devil www ssl list - shows all our SSL certificates.
After you add a domain, a directory called the same as the domain name will be created in ~/domains directory. Files, which we wish to share as a website have to be put in ~/domains/<domain>/public_html/.
If there is already a directory called the same as the domain name in ~/domains directory, it will be used. If this directory is not empty, then it will not be deleted when you request a domain deletion.
|
WarningAdding a django website requires additional actions from the user. More information can be found in WWW::Django article. |
|
WarningAfter adding a ror type, you need to invoke rails new public_ror in ~/domains/<domain> directory. |
|
WarningFastcgi type is used to launch your own applications, which can listen on UNIX Socket using FastCGI. |
After the domains has been added correctly, you have to add proper DNS entries (either in your domain provider interface, or in Devil::DNS, if the domain is parked on our name servers). You need to add IN A entries pointing to one or more of these IP addresses:
178.32.226.9 178.32.230.201 87.98.237.226 94.23.66.223 94.23.170.244 178.32.224.49 178.32.225.209
We are currently working on adding additional frameworks to DEVIL. If your framework is not supported, contact us, and we will manually add the proper configuration vhost.
|
See also.htaccess - custom rewrite rules and changing PHP version. |
SSL
Users who have bought their private IP address can use them with their private SSL Certificates. Unfortunatelly - one IP address can be bound only to one SSL Certificate, and there is no possibility to change that. Users who haven't bought 'private IP' service will use our default, MyDevil.net certificates - it means that sites in domain *.mydevil.net will be displayed correctly through https protocol, but private domains will display an error, telling about the incorrect certificate. All the user has to do then is accept this certificate in the browser and the website will display correctly.
We can add the certificate using:
devil www ssl add /usr/home/username/server.crt /usr/home/username/server.key
where server.crt is our certificate, and server.key is the key. Please remember to add the full path to the SSL certificate.
|
WarningIf an user wants to add his own CA, he can put it in the same file as the server certificate. If done so, the CA must be specified before the actual certificate! |
Access logs
If we wish to have logs about people entering our website (so called access logs), we need to create the proper directory and the file inside our domain directory, and allow the WWW server to write data into it:
mkdir ~/domains/example.com/logs touch ~/domains/example.com/logs/access.log chmod o+rwx ~/domains/example.com/logs/access.log
o+rwx permissions allow our httpd server to write to that file. By removing these permissions (by invoking chmod o-rwx) we will disable log writing. File rotation should be done by ourselves, for instance: by using newsyslog utility.
We are also working on enabling error logs for users, which will contain information about invalid .htaccess file configuration.
See also other Devil modules:
| WWW | Website management |
| Port | TCP/UDP Port opening |
| Info | Account information |
| MySQL | MySQL database management |
| PgSQL | PostgreSQL database management |
| DNS | DNS (domain name system) management |
| Mail accounts management | |
| Vhost | Available vhosts list |
Additional services management | |
| Java | Access to dedicated Java machine |
| BinExec | Management of 'Launching your own software' service |
| VPN | Management of 'Virtual Private Network' service |
| PlProxy | Management of 'Polish proxy server' service |
| USProxy | Management of 'US Proxy Server' service |