I have a VPS running Ubuntu and Apache
For example's sake, let's say the address is: 5.5.5.5
/home/eggdrop/
logs
, thus: /home/eggdrop/logs/
logs
contains two other directories named: dir1
and dir2
/home/eggdrop/logs/dir1/
& /home/eggdrop/logs/dir2/
Those locations would contain various log files I'd like to make public for anyone who visits a specific link.
How then could I expose dir1
to the following address, when typed in a browser: 5.5.5.5/dir1/
so that when someone visits that link, it would render a list of those log files contained in /home/eggdrop/logs/dir1/
?
Linux ubuntu18 4.15.0-22-generic #24-Ubuntu
you can use Alias:
Alias /dir1 /home/eggdrop/logs/dir1/
<Directory /home/eggdrop/logs/dir1/>
Require all granted
</Directory>
This line you can put into /etc/apache2/sites-available/default.conf
, inside VirtualHost
block.
Check your permission, if www-data user can read your logs directory.