Update README.md

This commit is contained in:
2026-04-05 14:29:52 +01:00
parent 03b508965b
commit 06fc20802f

View File

@@ -55,3 +55,34 @@ Every time I open my browser this is what I am now greeted with:
![picture](https://git.tobiastime.xyz/Tobias/Apache-LXC-Intranet/raw/branch/main/images/intranet.jpg)
## File Host
Additionally I decided to utilize Apache's directory sharing features to allow the serving and quick access of files over the LAN
I added this server block to my configuration
```
Alias /files /var/www/files
<Directory /var/www/files>
Options +Indexes
</Directory>
```
Break down:
- The alias maps the subdirectory accessed via the web of /files to the path on my system /var/www/files
- +Indexes specifies there isn't a typical index.html file to serve, rather it is a directory listing
After this I created a "jailed user" as detailed in my [BashDDNS page](https://git.tobiastime.xyz/Tobias/BashDDNS)
Essentially it is a restricted user who's only function and ability is to transfer files to a singular directory via SCP
With their own SSH key, restricted SSH permissions, no login shell and a modified chroot directory limiting system visability
After this I created an alias within my .bashrc file as follows:
``` bash
alias send2intra="scp -i /path/2/key "$1" jaileduser@192.168.0.70:/files"
```
This allows me to quickly type ```send2intra image.png``` in my terminal and have the file transfered to Apache, hosted and available for download within miliseconds