2019-11-14 13:12:12 +00:00
|
|
|
# # user website
|
2021-09-12 12:47:35 +00:00
|
|
|
your user page is available under
|
2019-10-12 18:18:28 +00:00
|
|
|
|
2020-08-03 10:49:30 +00:00
|
|
|
***https://envs.net/~username/***, ***https://envs.net/u/username/***,<br />
|
|
|
|
***https://username.envs.net/*** and ***https://username.envs.sh/***.
|
2019-10-12 18:18:28 +00:00
|
|
|
|
2021-09-12 12:47:35 +00:00
|
|
|
the index file location for your page is `~/public_html/` and<br />
|
2019-10-12 18:18:28 +00:00
|
|
|
a template for the page can you found in `~/public_html/your_index_template.php`.
|
|
|
|
|
|
|
|
static files are served normally, along with the following dynamic options:
|
|
|
|
|
|
|
|
- php - name the file with a `php` extension or use index.php
|
|
|
|
- sh / cgi - name the file with a `sh` or `cgi` extension
|
|
|
|
- perl - name the file with a `pl` extension
|
|
|
|
- python - name the file with a `py` extension
|
|
|
|
- lua - name the file with a `lua` extension
|
|
|
|
- cgi-bin - name it whatever you want and place it in `~/public_html/cgi-bin/`
|
|
|
|
|
|
|
|
if you're having trouble with any of these cgi scripts, make sure that the script has<br />
|
|
|
|
a correct shebang, sending the content-type header as the first thing and<br />
|
|
|
|
don't forget to make the scripts executable.
|
|
|
|
|
|
|
|
also you can use 'ssi' (server-side-includes). make sure you do not use a leading `/`.<br />
|
|
|
|
example: `<!--#include virtual="cgi-bin/fortune.sh" -->`
|
|
|
|
|
|
|
|
### ssgs
|
|
|
|
|
|
|
|
- [mkdocs](https://www.mkdocs.org/) - markdown project documentation tool.
|
|
|
|
additional themes are available from the [mkdocs-bootstrap](
|
|
|
|
http://mkdocs.github.io/mkdocs-bootstrap/) and [mkdocs-bootswatch](
|
|
|
|
http://mkdocs.github.io/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](https://gohugo.io/) - static site generator built in go
|
|
|
|
- [jekyll](https://jekyllrb.com/) - static site generator used by github for
|
|
|
|
[github pages](https://pages.github.com) built in ruby
|
|
|
|
- [pelican](https://getpelican.com/) - pelican is a static site generator, written in python
|
|
|
|
- [zola](https://www.getzola.org/) - single-binary static site generator written in rust
|
|
|
|
|
2021-07-07 09:57:10 +00:00
|
|
|
## restricted location
|
|
|
|
|
|
|
|
it is also possible to set up a password protected area for your site.<br />
|
|
|
|
this part is located at `~/public_html/restricted/` and you can set it up as follows:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
mkdir ~/public_html/restricted
|
2021-08-04 12:55:43 +00:00
|
|
|
chmod 705 ~/public_html/restricted
|
|
|
|
|
2021-07-07 09:57:10 +00:00
|
|
|
touch ~/.htpasswd
|
|
|
|
htpasswd -m ~/.htpasswd username
|
2022-05-26 16:43:24 +00:00
|
|
|
chmod 604 ~/.htpasswd
|
2021-07-07 09:57:10 +00:00
|
|
|
```
|
|
|
|
|
2019-10-12 18:18:28 +00:00
|
|
|
## 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`:
|
|
|
|
```html
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="refresh" content="0; url=https://www.w3docs.com/" />
|
|
|
|
</head>
|
|
|
|
</html>
|
|
|
|
```
|
|
|
|
example `index.php`:
|
|
|
|
```php
|
2020-01-21 10:56:28 +00:00
|
|
|
<?php header('Location: https://www.w3docs.com/', true, 302); exit(); ?>
|
2019-10-12 18:18:28 +00:00
|
|
|
```
|