Enabling directory listings for a website folder.
Web servers look for specific files when the server is accessed for a web page request. These files often include types like "index.htm", "index.html", "index.php", "index.asp", etc. If a "site launch" file is not found, often the server will return an error message to the users browser window.
Having this feature is more or less a basic security feature to prevent contents of the domain being requested from displaying to the public. However there may be cases in which you desire to show the contents of a folder in a website. In order to do this, we would need to turn on directory browsing.
First we will cover the Windows Hosting Environment, then the Linux below.
There are 3 different ways of getting this accomplished for EPhost Windows Hosting Plans.
Windows Hosting Using Control Panel
- Login to your account
- Click the green "Control Panel" button
- Hover over the "Web" icon and click on "Websites"
- Click on the site name you wish to modify
- On the "Home Folder" Tab, click the box for "Enable Directory Browsing"
Modify the web.config (Windows Hosting)
- Login to your account
- Click the green "Control Panel" button
- Click on the "File Manager" icon
- Navigate to the directory that holds your website
- Look for a file or create one called "web.config" in the root of that website
- It's contents should look like the following
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>
NOTE: To Turn OFF Directory Browsing, simply replace the word "false" where the word "true" is located.
Using Helicon Ape (.HTACCESS) (Windows Hosting)
- Login to your account
- Click the green "Control Panel" button
- Hover over the "Web" icon and click on "Websites"
- Click on the site name you wish to modify
- Click on the ".htaccess" tab
- Click the button that says "Add .htaccess folder" or IF there is already one there, for the directory you wish to modify, click on that
- It's contents should have a line statement that say "Options +Indexes" to turn ON Directory Browsing to the world.
- If you wish to turn it off, simply use the minus symbol instead of the plus as in "Options -Indexes"
Linux Directory Browsing
Linux has two different ways of accomplishing this task.
Linux CPanel
- Login to your account
- Click the green "Control Panel" button
- Scroll down to the 'Advanced' Section and click on "Indexes"
- Here you can click on the 'folders' you wish change.
OPTIONS here are to use the system default, which is "No Indexing", Of course "No Indexing", "Standard Indexing (filename only)" and "Fancy Indexing (filename and description)"
.HTACCESS FILE (manually)
- Login to your account
- Click the green "Control Panel" button
- In the File Section, click on "File Manager"
- Navigate to your website root directory (usually /home/acctname/public_html) and highlight the ".htaccess" file
- Click the 'Edit' and make sure you see it's contents. They will function to to turn ON Directory Browsing to the world.
Options +Indexes
Also See: Website Features KB's | Domain/DNS KB's | HOW TO KB's | Email Settings POP3 / IMAP | Check email online | Email Troubleshooting | Adding an email to your hosting account WINDOWS / LINUX
Contact Support
If you are still having issues, please contact us for further help.
1-877-EPHOST1 | support@ephost.com