This post is for people that already have a Synology with web services (a web server) running. This describes how to allow directory browsing.
If you have a Synology and want to have a publicly or privately accessible website with simple directory browsing, you need to include an htaccess file. I had setup my web services and was able to view the default page from the web. This would be fine if I wanted a normal website, but I do not want that. I want a simple web page that will automatically list files that I drop in a folder on my Synology (as seen below). This allows me to drop a file in a folder and then it may be downloaded from my web page with no need to create links.
To create the required htaccess file, do the following:
- Use your text editor of choice and create a new text file.
- Paste the following text:
# STRONG HTACCESS PROTECTION <Files ~ "^.*\.([Hh][Tt][Aa])"> order allow,deny deny from all </Files> Options +Indexes # SET INDEX OPTIONS IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble # SET DISPLAY ORDER IndexOrderDefault Ascending Name
- Save the text file as htaccess.txt (we will rename later).
- Copy the htaccess.txt file to the web services directory that you want to have appear as my image above.
- Rename the htaccess.txt to .htaccess (nothing before the period and no extension).
- Place files that you want visible or downloadable to visitors in the folder where you placed the .htaccess file.
As long as your web services was already configured properly, you should now be able to see your files listed as my image above.
This post was updated on 10/23/2016 to correct an issue pointed out by a comment from snoop.