Change /srv/http/pages to /srv/http

Anthony Wang 2024-01-20 11:12:01 -05:00
parent 52a9aec3f3
commit 26e694150e
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ
3 changed files with 10 additions and 10 deletions

2
SSH.md

@ -24,4 +24,4 @@ You can route your internet traffic through exozyme using [SOCKS](https://en.wik
### ngrok alternative
You can use SSH reverse port forwarding to make a port on your local machine publicly available on the internet. If you would like to expose port 8000 on your local machine, just run `ssh -R /srv/http/pages/subdomain:localhost:8000 exozy.me` and it will be accessible at https://subdomain.exozy.me.
You can use SSH reverse port forwarding to make a port on your local machine publicly available on the internet. If you would like to expose port 8000 on your local machine, just run `ssh -R /srv/http/subdomain:localhost:8000 exozy.me` and it will be accessible at https://subdomain.exozy.me.

@ -70,8 +70,8 @@ From @daudix on Matrix:
## /.snapshots
You can find previous snapshots of your home directory and other directories such as `/srv/http/pages`, in case you accidentally delete important files.
You can find previous snapshots of your home directory and websites in here, in case you accidentally delete important files.
## write
This is similar to `wall`, but addressed to a specific user. You can send a message to another exozyme member who is currently logged in by running `write USER`. Then end the message with Ctrl-C.
This is similar to `wall`, but addressed to a specific user. You can send a message to another exozyme member who is currently logged in by running `write USER`. Then end the message with Ctrl-C.

@ -1,4 +1,4 @@
exozyme offers free static and dynamic website hosting with **exopages**. If you make a cool website and would like to add it to the [exozyme-hosted community websites list](https://exozy.me/explore#community-websites), send a message on Matrix or make a PR to this repo.
exozyme offers free static and dynamic website hosting. If you make a cool website and would like to add it to the [exozyme-hosted community websites list](https://exozy.me/explore), just send a message on Matrix or make a PR to this repo.
## Static hosting
@ -10,7 +10,7 @@ Ideally, you want a name that will stand out. I usually go with my username, lik
### 2. The back-end basics
SSH into exozyme, then travel over to `/srv/http/pages`. After that, make a directory. Title it the name you decided in the previous section, as long as it's not taken. Once that's done, enter it and run `touch index.html`. This will create the main page for your website. So when people travel there, they will see this file by default.
SSH into exozyme, then travel over to `/srv/http`. After that, make a directory. Title it the name you decided in the previous section, as long as it's not taken. Once that's done, enter it and run `touch index.html`. This will create the main page for your website. So when people travel there, they will see this file by default.
### 3. Writing the website stuff
@ -19,11 +19,11 @@ Once you're done writing mindless code for now, save and quit the file. Now open
Now, thanks to exozyme and @megawatts, you have your own Internet place where you can do whatever you want!
**TL;DR: If you create a directory with files for your static website at `/srv/http/pages/subdomain`, the website will be available at `subdomain.exozy.me`.**
**TL;DR: If you create a directory with files for your static website at `/srv/http/subdomain`, the website will be available at `subdomain.exozy.me`.**
## Dynamic hosting
The ports 4200 to 4209 are proxied to the domains https://0.exozy.me to https://9.exozy.me. You can also create a Unix socket called `/srv/http/pages/subdomain` with permissions `660`, which will be proxied to https://subdomain.exozy.me. If your website only supports binding to a TCP port but you would like it to bind to a Unix socket, you can use `socat UNIX-LISTEN:/srv/http/pages/subdomain,mode=660,fork TCP:localhost:1234`. This proxies all requests to https://subdomain.exozy.me to your website hosted on port 1234. To run your website automatically, you should write a [systemd user service](User-services). If you need a more complex web server configuration than just simply proxying a port, you can submit a pull request to our [nginx config file](https://git.exozy.me/exozyme/nginx) repository.
The ports 4200 to 4209 are proxied to the domains https://0.exozy.me to https://9.exozy.me. You can also create a Unix socket called `/srv/http/subdomain` with permissions `660`, which will be proxied to https://subdomain.exozy.me. If your website only supports binding to a TCP port but you would like it to bind to a Unix socket, you can use `socat UNIX-LISTEN:/srv/http/subdomain,mode=660,fork TCP:localhost:1234`. This proxies all requests to https://subdomain.exozy.me to your website hosted on port 1234. To run your website automatically, you should write a [systemd user service](User-services). If you need a more complex web server configuration than just simply proxying a port, you can submit a pull request to our [nginx config file](https://git.exozy.me/exozyme/nginx) repository.
If you're using podman-compose to run containers, you can use [this](https://git.exozy.me/dragongoose/weblate-podman-compose/src/commit/80adfce9e294c7b53bd3f23b8f0c1d4a495d7a5b/docker-compose.yml#L37-L41) workaround expose a port to a unix socket:
```yml
@ -32,10 +32,10 @@ If you're using podman-compose to run containers, you can use [this](https://git
environment:
command: "UNIX-LISTEN:/mnt/<SERVICE_NAME>,fork,mode=660 TCP4:<CONTAINER_NAME_TO_FOWARD>:<CONTAINER_PORT>"
volumes:
- /srv/http/pages:/mnt
- /srv/http:/mnt
```
This uses an alpine container with socat installed, and creates the socket in the pages directory
This uses an Alpine container with socat installed, and creates the socket in the `/srv/http` directory.
## CGI scripts
@ -43,4 +43,4 @@ Our nginx server does not have CGI enabled for security reasons. If you would li
## Sub-subdomains and custom domains
If you would like to use a sub-subdomain (for instance blog.user.exozy.me) or a custom domain for your exopages website, you will have to fork our [nginx configs repo](https://git.exozy.me/exozyme/nginx) and write a short config file for your website. See the configs for [karawale.in](https://git.exozy.me/exozyme/nginx/src/branch/main/pranav.conf) or [neovoid.is-cool.dev](https://git.exozy.me/exozyme/nginx/src/branch/main/nvpie.conf) for examples. For custom domains, you also need to add a `CNAME`, `ANAME`, or `ALIAS` record in your DNS settings to point your custom domain to `exozy.me`. Make sure you point your domain to `exozy.me` and not our IP address, since our IP address changes occasionally. exozyme will handle generating and renewing the TLS certificate.
If you would like to use a sub-subdomain (for instance blog.user.exozy.me) or a custom domain for your website, you will have to fork our [nginx configs repo](https://git.exozy.me/exozyme/nginx) and write a short config file for your website. See the configs for [karawale.in](https://git.exozy.me/exozyme/nginx/src/branch/main/pranav.conf) or [neovoid.is-cool.dev](https://git.exozy.me/exozyme/nginx/src/branch/main/nvpie.conf) for examples. For custom domains, you also need to add a `CNAME`, `ANAME`, or `ALIAS` record in your DNS settings to point your custom domain to `exozy.me`. Make sure you point your domain to `exozy.me` and not our IP address, since our IP address changes occasionally. exozyme will handle generating and renewing the TLS certificate.