User Tools

Site Tools


technical

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
technical [2019/04/16 12:26] – [* OCLUG live distro] jcnashtechnical [2019/11/15 11:37] – [* OCLUG live distro] jcnash
Line 1: Line 1:
 ===== Technical Projects and Notes ===== ===== Technical Projects and Notes =====
  
-====   * Assorted notes ====+====   20190416 ==== 
 + 
 +**bind mount** to get web server link to files outside //Documentroot// device 
 + 
 +Wanting to give access at home to some files of use for 
 +home activities, I set up a web server (I tried both nginx 
 +and apache2). However, a symlink to the files of interest 
 +pointed outside the current device. I was able to point to 
 +files in my home directory from a symlink in /var/www/html 
 +without difficulty. (/home is on same device as /var/www) 
 + 
 +I tried a number of configuration settings in the .conf files, 
 +including "alias" and various FollowSymLinks tries, without 
 +success. 
 + 
 +At the April 4 linux-ottawa meeting, Alex Pilon suggested a 
 +bind mount, and this works. 
 + 
 +My example:  
 + 
 +Directory /var/www/html/ contains files and symlinks 
 +There is a directory tto18 with 755 permissions and root ownership. 
 + 
 +The command  
 + 
 +sudo mount -o bind /media/john/Rebecca /var/www/html/tto18 
 + 
 +allows local users (on local router, and therefore hopefully  
 +inside the firewall) to access my machine as "john-j6-18.local" 
 +and see this directory, which points to a disk that is attached. 
 + 
 +To get this set up when my machine boots, I tried adding  
 +the command "/home/john/bin/bmreb" to the Startup Items in the Linux Mint 
 +Control Centre. "bmreb" is a file with contents 
 + 
 + #!/bin/bash 
 + # bmreb -- bind mount rebecca 
 + mount -o bind /media/john/Rebecca /var/www/html/tto18 
 +  
 +It is owned by root and has 755 permissions. Rebooting, I found 
 +that the bind mount was not active. In Linux Mint 19.1, it is now 
 +necessary to use systemd to start such items as indicated in  
 +https://forums.linuxmint.com/viewtopic.php?t=275464 
 +which gives a tutorial. I followed this and have a working  
 +startup. 
  
 ====   * OCLUG live distro ==== ====   * OCLUG live distro ====
technical.txt · Last modified: 2024/03/31 15:34 by scott5