https://github.com/savaged/cgicc-intranet
Internal website
https://github.com/savaged/cgicc-intranet
Last synced: 5 months ago
JSON representation
Internal website
- Host: GitHub
- URL: https://github.com/savaged/cgicc-intranet
- Owner: savaged
- Created: 2021-02-09T14:21:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-04T09:34:26.000Z (over 5 years ago)
- Last Synced: 2024-12-31T07:43:54.424Z (over 1 year ago)
- Language: C++
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Intranet
Internal website using CGI with Apache 2
## WIP
* Need to do a lot of work to understand CGI configuration with Apache 2
* OR switch to one executable that does everything, with links driven by arguments
* Going down this route using this reference:
* https://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm
## Structure
* Entry point: `var/www/html/index.html`
* CGI executable: `index.cgi`
## Deployment
* The entry point (`index.html`) is copied to `var/www/html/`
* The CGI executable is copied to `/usr/lib/cgi-bin/`
## Pre-requisites
```
sudo apt update
sudo apt install apache2
sudo usermod -a -G www-data pi
sudo a2enmod cgi
sudo service apache2 restart
```
## Context
At the start I have two goals.
1. To have fun learning and tinkering with CGI
2. To be able to browse from any device to my useful private(ish) data, at home.
1. That includes my 'todo' list and I had in mind something like this:
```
#!/bin/bash
echo "TO DO" ;
print_header=true
while read INPUT ; do
if $print_header;then
echo "$INPUT" | sed -e 's/:[^,]*\(,\|$\)/<\/th>/g'
print_header=false
fi
echo "${INPUT//,/}" ;
done < ~/repos/docs/todo.csv ;
echo ""
```