Skip to content
Advertisement

How to stop directory listing for angular project in Linux

I have deployed angular 8 project in linux sub domain (web.mydomain.com), but when I am accessing web.mydomain.com directory listing is showing instead of loading website, but when I am accessing http://web.mydomain.com/index.html it is working.

Below is the htaccess file looks like :

JavaScript

Advertisement

Answer

Add following line in your htaccess

JavaScript

Either you may try

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement