Apache server & directory browsing

Tazmius

Cadet
Joined
Jan 9, 2022
Messages
1
I am trying to get directory browsing set up on Apache to be able to use Roksbox from a Roku to watch movies. Roksbox requires directory browsing to work, I've read the previous posts for this but those are 10+ years old and not working for me.

I'm running TrueNAS core ver 12.0.U7 and have successfully installed apache24. When I go to the ip address from a browser I get the "It Works!" page so I know apache is up an running.

Source: /mnt/ShareTest/Movies
Destination: /mnt/ShareTest/iocage/jails/Apache/root/mnt/Movies

I'm not sure what to browse to..I've tried ipaddress/Movies, /mnt/Movies. etc with no success.I've set my mount points up but when I try to browse to them.

I am new to TrueNAS and probably consider myself a tech hobbyist regarding Linux/FreeBSD, so I know quite a bit but am struggling to figure this out.

If anyone can assist it would be greatly appreciated!
 
Joined
Jan 7, 2015
Messages
1,155
So all the kids are using Plex to accomplish this these days. But if you insist on going this route heres a path to follow of the basic things youll need to do.

This is pretty easy to do what youll need to do is remove the welcome "It Works" index.html. If theres an index.html in the directory it will just display that and not your index. This file will likeley be located here /usr/local/www/apache24/data/

Then youll want to create an entry for this directory in the virtualhost file. Mine is in /usr/local/etc/apache24/httpd-vhost.conf. Youll end up with something like this in there.

Code:
<VirtualHost 192.192.192.192:80>
ServerAdmin user@domain.com
ServerName domain.com
DocumentRoot /mnt/movies
<Directory “/mnt/movies“>
Options All Indexes FollowSymLinks
Require all granted
</Directory>
ErrorLog /var/log/apache-vhost/error.log
CustomLog /var/log/apache-vhost/access.log combined
</VirtualHost>


Depending on how you are planning to use this apache server otherwise you could just likely make all directories and allow showing of an index the default way. This is not going to be recommended, but maybe this is whats best for you. You could tweak the main httpd.conf file in the same directory and accomplish this server wide. The important line is Options All Indexes FollowSymLinks and Require all granted

You are also going to have to allow the system user www access to the directory /mnt/movies.

Then in the end your goal is to "view" these files via a web browser? To access youll just go to the jails IP address in any web browser. IE http:/192.192.192.192. Pretty much it.
 
Top