add files directory to be allow file server
create directory | |
---|---|
mkdir /var/www/html/files | |
change config | |
vi /etc/apache2/apache2.conf | |
add | <Directory /var/www/files> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> |
to list directories | sudo a2enmod autoindex |
restart the process | sudo systemctl restart apache2 |
test locally | |
curl localhost/files/test.txt | |
test in browser | |