Localhost/silverstripe - "index of" showing list of files instead of showing the website

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: 4.7

Question: How to fix this error? when I try to visit localhost/silverstripe on my browser, instead of showing the website, it shows the files within the silverstripe folder

Screenshot%20from%202021-02-02%2019-40-37

and then when I visit http://localhost/silverstripe/public it redirects to http://localhost/silverstripe/public/dev/build and it shows like this.

Screenshot%20from%202021-02-02%2019-42-24

What should I do to fix this problem? any suggestions? thank you

It sounds like you are missing the root .htaccess file. It’s an invisible system file, so an easy mistake to make.

Hi. I just want to share on how I resolve this problem. On my apache2.conf, I just set the AllowOverride “None” to “All” in Directory /var/www

1 Like