about

links

scripts

Sharing linux/windows scripts and tips

Nginx as a file server

April 21, 2019 — Jesse Harris

FTP, SMB, SSH, HTTP... The list goes on.

There are many ways to serve files. Here is a quick note of how I edited the default raspbian nginx conf files to enable a simple directory with browsing to be served from a raspberry pi

~~~

```

sudo apt-get install nginx-light -y

```

```

sudo chmod o+x /media /media/JesseHD /media/JesseHD/Movies

```

```

server {

listen 80;

listen [::]:80;

server_name 192.168.178.88;

root /media/JesseHD/Movies;

autoindex on;

}

```

```

sudo systemctl restart nginx

```

Tags:

raspberry-pi

nginx

© Jesse Harris

mailto:jesse@zigford.org

Generated with bashblog, a single bash script to easily create blogs like this one

bashblog