hints:misc
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| hints:misc [2023/08/18 19:40] – [Building a Looking Glass] philip | hints:misc [2023/08/18 21:20] (current) – [Building a Looking Glass] philip | ||
|---|---|---|---|
| Line 46: | Line 46: | ||
| These instructions cover how to put together the [[https:// | These instructions cover how to put together the [[https:// | ||
| - | First off, grab the few files you need off the repo - you could clone it, but there are only a few files, and they haven' | + | First off, grab the few files you need off the repo - you could clone it, but there are only a few files, and they haven' |
| + | |||
| + | Assuming a basic install of Ubuntu 22.04, we need to add a few packages, including a compiler. | ||
| + | < | ||
| + | sudo apt install apache2 make gcc libexpat1-dev | ||
| + | </ | ||
| + | |||
| + | Next we need to install a few extra perl modules to support the looking glass. Assuming we don't have CPAN already set up, we need to do: | ||
| + | < | ||
| + | cpan App:: | ||
| + | </ | ||
| + | This installs the basic CPAN environment to make adding in modules simpler. Once the CPAN environment is in place, you then need to run: | ||
| + | < | ||
| + | cpan install CPAN:: | ||
| + | cpan install XML:: | ||
| + | cpan install Net:: | ||
| + | </ | ||
| + | which will install the XML parser and telnet support for Perl. This should all complete successfully - you'll see these two packages and all the supporting modules being automatically installed. | ||
| + | |||
| + | With the Apache2 webserver installed in its default configuration, | ||
| + | < | ||
| + | sudo mkdir -p / | ||
| + | </ | ||
| + | And then copy the required components into place. | ||
| + | < | ||
| + | sudo cp -p favicon.ico index.html lg.cgi lg.conf / | ||
| + | </ | ||
| + | |||
| + | Next we need to create the Apache site configuration: | ||
| + | < | ||
| + | cd / | ||
| + | </ | ||
| + | and create a new config file with the URL of your site, for example, **lg.my.site.conf** with the following contents: | ||
| + | < | ||
| + | < | ||
| + | ServerName | ||
| + | |||
| + | DocumentRoot / | ||
| + | |||
| + | Alias / | ||
| + | Alias /libraries / | ||
| + | ScriptAlias /lg / | ||
| + | |||
| + | < | ||
| + | AllowOverride None | ||
| + | Options +ExecCGI | ||
| + | AddHandler cgi-script .cgi .pl | ||
| + | Require all granted | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | We need to turn on support for CGI: | ||
| + | < | ||
| + | sudo a2enmod cgid | ||
| + | </ | ||
| + | |||
| + | Then we need to enable the site: | ||
| + | < | ||
| + | sudo a2ensite lg.my.site | ||
| + | </ | ||
| + | and then restart Apache2 for it to go live: | ||
| + | < | ||
| + | sudo systemctl restart apache2 | ||
| + | </ | ||
hints/misc.1692387658.txt.gz · Last modified: by philip
