diff options
-rw-r--r-- | create-a-wiki-preview.mdwn | 77 |
1 files changed, 13 insertions, 64 deletions
diff --git a/create-a-wiki-preview.mdwn b/create-a-wiki-preview.mdwn index 79e48ce..014b527 100644 --- a/create-a-wiki-preview.mdwn +++ b/create-a-wiki-preview.mdwn @@ -44,7 +44,7 @@ Buster. This is the overview of software needed: * Pandoc -- from Debian * Some Ikiwiki plugins (e.g. for Pandoc) which will be provided from Fripost's configuration and wiki repositories. - * Nginx -- webserver from Debian + * BusyBox -- includes http-server, included in Debian Install and configure Git ========================= @@ -126,79 +126,28 @@ Run setup: ikiwiki --setup ~/.ikiwiki/fripost-wiki.setup -Install and conifgure Nginx and host files -========================================== - -Fripost uses [Nginx](http://nginx.org/en/docs/). For installation and -configuration -follow [Ikiwiki on Dot CGI](https://ikiwiki.info/tips/dot_cgi/). Note -the alexjj comment that on Debian the package *fcgiwrap* automatically -spwans the FastCGI program. - - sudo apt install nginx - -The follwing will configure *http://wiki.fripost.localhost* and -*http://fripost.localhost*: - -``` -cat <<EOF | sudo tee /etc/nginx/sites-available/localhost.fripost.conf -server { - listen [::]:80; - listen *:80; - server_name fripost.localhost; - access_log /var/log/nginx/access.log.localhost.fripost.log; - error_log /var/log/nginx/error.log.localhost.fripost.log; - location / { - root $HOME/public_html/fripost-wiki/website; - location /static { - root $HOME/public_html/fripost-wiki; - } - } -} - -server { - listen [::]:80; - listen *:80; - server_name wiki.fripost.localhost; - access_log /var/log/nginx/access.log.localhost.fripost.wiki.log; - error_log /var/log/nginx/error.log.localhost.fripost.wiki.log; - location / { - root $HOME/public_html/fripost-wiki; - } -} -EOF -``` +Starting, refreshing and rebuilding the wiki +============ +Now all the configuration is done. +This section will discuss commands that needs to be executed repeatedly. -Make available, test and install: +The following command will start the web server on port 8080: ``` -sudo ln -s -r -t /etc/nginx/sites-enabled/ /etc/nginx/sites-available/localhost.fripost.conf -sudo nginx -t && sudo systemctl restart nginx.service +busybox httpd -p 127.0.0.1:8080 -h "$HOME/public_html/fripost-wiki" ``` -Modify host files: +This server will shut down when your computer does. +If you want to shut down the server, but not your computer, run the following command: ``` -cat <<EOF > /tmp/hosts - -# Fripost wiki preview setup -127.0.1.1 wiki.fripost.localhost fripost.localhost -::1 wiki.fripost.localhost fripost.localhost -EOF -grep -q wiki.fripost.localhost /etc/hosts \ - || { sudo cp /etc/hosts /etc/hosts.bac_$(date +%Y%m%d) \ - && sudo sed -i '$ r /tmp/hosts' /etc/hosts ; } +pkill -ef "busybox httpd -p 127.0.0.1:8001" ``` -Alternatives to Nginx include Apache. Fripost wiki used include -configuration for Apache, but these are not maintained any -longer. Brows this repository history for sample configurations. - -Refresh wiki -============ +Now all is in place! Visit <http://localhost:8080/>. +The main site page can be accessed at <http://localhost:8080/website/>. -Now all is in place! Visit <http://wiki.fripost.localhost>. Use the -following commands to refresh or fully rebuild the wiki: +Use the following commands to refresh or fully rebuild the wiki: ``` ikiwiki --setup ~/.ikiwiki/fripost-wiki.setup --refresh |