Creating FTP Directory

8 posts / 0 new
Last post
#1 Sat, 05/27/2017 - 20:42
SurfBlue714
SurfBlue714's picture

Creating FTP Directory

Hello, I am attempting to setup site where you go to domain.tld and get an index of files similar to this, however instead without any files in it I am just getting Error 403 - Forbidden. If I remember I did this once by going to Apache Webserver and editing the global config files to include:

allow from all
Options +Indexes
IndexOptions IgnoreCase FancyIndexing FoldersFirst
Require all granted

between two Directory tags, however since Virtualmin set things up I find it hard to figure out which one is which other than guessing. Whenever I previously messed with it I was using Webmin and that time I knew because I created said webserver. Anyways, any hints or suggestions? Thanks in advance to all who read and my highest gratitude to all who offer assistance!

Sat, 05/27/2017 - 22:15
Joe
Joe's picture

That's not FTP...still WWW.

But, yes, a download directory configuration looks about like that. You can add your own Directory section to the Apache config, or you can use Webmin Apache module to add a new one with those options.

Your directory section just goes inside of the VirtualHost section for the domain you want it to appear in.

One of ours is configured like this:

<Directory /home/virtualmin/domains/cloudmin.virtualmin.com/public_html/gpl>
Options SymLinksifOwnerMatch IncludesNOEXEC Indexes
AllowOverride All
IndexOptions FancyIndexing
allow from all
satisfy any
</Directory>

And, that's inside of the cloud.virtualmin.com VirtualHost section.

--

Check out the forum guidelines!

Sat, 05/27/2017 - 22:20
Joe
Joe's picture

Oh, and to do it in Webmin, just browse to the virtual server and create a new directory options section in the "Create Per-Directory, Files or Location Options" section of the Apache module. You can also add arbitrary Directory sections to the Server Template for Apache.

Many ways to solve it.

--

Check out the forum guidelines!

Sun, 05/28/2017 - 16:43
SurfBlue714
SurfBlue714's picture

Thanks Joe! I played around with it and took your advice and got it working! Your awesome, much appreciated! :-D

Sun, 09/23/2018 - 01:17
BarryBear

Hi sorry to necro-post but I found this thread in a search and I am having the same problem... i tried the above but i keep getting an error 403.

For the sake of simplicity, how would one set up what surfblue described on a freshly created virtual server?

Sun, 09/23/2018 - 09:56
jimdunn

I just create a directory and put the following .htaccess file in it:

Options +Indexes
IndexOptions +FancyIndexing +IgnoreCase +FoldersFirst
Sun, 09/23/2018 - 17:23
BarryBear

Heres what I have done so far... I created a subserver as sub.domain.tld and then went to "configure website" under services and then went to directory and tried playing with options before checking to no avail. I reset to default and created then went to "edit directives" and tried to manually edit... no avail, i went and copied what joe wrote and even overwrote my public_html... no avail...

EDIT: I didn't have an htaccess in public_html so I created one and it worked! Thanks for all your help Jim!

Also is it possible to do have a file dorectory with https or is it only http?

Sun, 09/23/2018 - 19:00
jimdunn

I was able to setup an https://subserver.domain.com with a Let's Encrypt SSL cert, et al.

(just enable SSL WEBSITE in virtual server features first)

Topic locked