Como Crear Indexador de Archivos en Dietpi Con H5ai y Nginx

Como Crear Indexador de Archivos en Dietpi Con H5ai y Nginx

is that a question or any information you like to share? Probably you can use English as not everybody is speeding Spain.

How can i create a file indexer with h5ai y nginx. Already i run the configuration of h5ai but when touch the nginx.config that down any other service. i need help to do this.

h5ai last update was 3 years ago, I would not use that.
Nginx has a build function to list files from a directory or do you need some special features h5ai has?

I was want to use h5ai for a good visual of the index. But first i need configure nginx to list my files. That files are in a external storage mounted on the dietpi runing on a virtual machine. I cant do the touch of the .conf files on nginx because the other services down. And i try with create o modify nginx files on dietpi-sites, also on sites available and link it with sites enabled and no work. Please help me how can i do this. I watch tutorials for nginx but whit dietpi is diferent for the other services runing.

What exactly do you mean with this? What other services? Services on your webserver?

FIrst I would symlink the files from the external drive to your /var/www directory, preferably in it’s own subpath.
Then you modify your config (or you create a serperate drop-in config):

location /targetfolder {
    root /var/www/my.website.com/html/targetfolder;
    index index.html;
    autoindex on;
    autoindex_exact_size off;
}

The targetfolder ist the folder where the files are located you wanna list. You probably don’t want the index option if you just want to list everything from the folder.

1 Like

Other Services of dietpi like Jellyfin, Nextcloud down.

You could start sharing the configuration you do to nginx. This way we could see what’s wrong on yours.

Here is my config file, i try but not work.
default.txt (589 Bytes) I do the symlink to the folder /var/www/ of my folder in the external hard drive and the symlink is working fine.

mod edit:

# /etc/nginx/sites-available/default
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www;
	index index.php index.html index.htm index.nginx-debian.html;

	server_name "$hostname";

	include /etc/nginx/sites-dietpi/*.conf;

	location / {
		try_files $uri $uri/ =404;
	}

	location ~ \.php(?:$|/) {
		include snippets/fastcgi-php.conf;
		fastcgi_pass php;
	}

        location /Series {
            root /var/www/h5ai/public/index.php/Series;
            /h5ai/public/index.php;
            autoindex on; 
            autoindex_exact_size on;  
        }
}

I think this is not the correct path root /var/www/h5ai/public/index.php/Series;
Also the next line is missing the index entry.
Can you share the output of

ls -laR /var/www

output var.txt (487,3 KB)

There is only a folder for nextcloud and a bunch of .js and .json files in /var/www, but no symlinked folder called h5ai.

personally I would not do any changes to the default configuration file. Better to use own config file to create something like a dedicated vhost if an individual document root is required.

1 Like

How can i create a new config.file without down everything else.

This is my config file that not down jellyfin, nextcloud or any other service. But when i try to visit the url nginx shows me an 404 error
DEFAULT.txt (670 Bytes)

Does this file exists /var/www/h5ai/public/index.php?

Yes it does

Can you please post the ouput of

ls -laR /var/www/h5ai/

When i run that comand only shows the nextcloud folder

I don’t understand what you are doing.

And then you tell me there is only a folder for nextcloud inside, so this file does not exist ergo you can not reach it and you get 404 response.

How did you install h5ai?