Skip to content

# user website#

your user page is available under

https://envs.net/~username/, https://envs.net/u/username/ and
https://username.envs.net/.

the index file location for your page is ~/public_html/ and
a template for the page can you found in ~/public_html/your_index_template.php.

html, php and cgi#

static content (such as .html, .css, .js and images) is served directly from ~/public_html/ and is available immediately. dynamic scripts are supported too:

  • php - use a .php file, for example index.php. php scripts do not need an executable bit.
  • cgi - use .cgi, .sh, .pl, .py or .lua for shell, perl, python and lua scripts.
  • cgi-bin - you can place cgi scripts in ~/public_html/cgi-bin/ as well. use one of the supported cgi extensions for reliable routing.

php and cgi are enabled automatically. envs.net checks user websites every 15 minutes and, when it detects scripts that need them, provisions a separate php-fpm or cgi service running as your own shell user, not the shared web server user. no manual activation is normally needed. static html continues to work while this happens. a newly uploaded php/cgi script may return 403 Forbidden until its private backend has been activated. if it still fails after the next scan, check your file permissions and contact the admins.

for cgi scripts, provide a valid shebang (such as #!/usr/bin/env python3), output a Content-Type header followed by a blank line, and mark the script executable (for example, chmod 755 ~/public_html/cgi-bin/hello.cgi). do not make your scripts or webroot world-writable (chmod 777 is unsafe).

also you can use 'ssi' (server-side-includes). make sure you do not use a leading /.
example: <!--#include virtual="cgi-bin/fortune.sh" -->

ssgs#

  • mkdocs - markdown project documentation tool. additional themes are available from the mkdocs-bootstrap and mkdocs-bootswatch projects. just set your theme name to one those listed and rebuild. generally recommended to not build the mkdocs source directly in your webroot. set the destination to somewhere in ~/public_html, symlink, or move/copy the generated files manually. for example, if you wanted to make a mkdocs site called mywiki available on the web, you could do: ln -s ~/mywiki ~/public_html/wiki
  • hugo - static site generator built in go
  • jekyll - static site generator used by github for github pages built in ruby
  • pelican - pelican is a static site generator, written in python
  • zola - single-binary static site generator written in rust

restricted location#

it is also possible to set up a password protected area for your site.
this part is located at ~/public_html/restricted/ and you can set it up as follows:

mkdir ~/public_html/restricted
chmod 705 ~/public_html/restricted

touch ~/.htpasswd
htpasswd -m ~/.htpasswd username
chmod 604 ~/.htpasswd

forward / rewrite url to a other site#

If you would like to redirect your page then you can do so with a simple workaround.

example index.html:

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="refresh" content="0; url=https://www.w3docs.com/" />
  </head>
</html>

example index.php:

<?php header('Location: https://www.w3docs.com/', true, 302); exit(); ?>

webring#

check out webring for instructions of how to add your public_html page to the envs webring.