My project name is lsapp (which is inside htdocs) The problem is when I go to localhost or localhost/lsapp the directory of files is shown on the browser. I have setup up the C:\xampp\apache\conf\extra and modified httpd-vhosts.conf as required, Opened hosts files in C:\Windows\System32\drivers\etc and modified as required. I have checked several times for any typos etc. Everything in these files are now fine. And there is another file httpd.conf in which I have removed the # in the second line as follows.
.# Virtual hosts Include conf/extra/httpd-vhosts.conf
One thing is I have found two http.conf files, in the following different locations. All these files are similar. Do I have to do 1) C:\xampp\apache\conf (The setting is as below) .# Virtual hosts Include conf/extra/httpd-vhosts.conf
2) C:\xampp\apache\conf\original .# Virtual hosts .#Include conf/extra/httpd-vhosts.conf
Also there is one more http-vhosts.conf file inside C:\xampp\apache\conf\original\extra
IT HAS NO # AND IS AS FOLLOWS:
ServerAdmin [email protected]
DocumentRoot "${SRVROOT}/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
ServerAdmin [email protected]
DocumentRoot "${SRVROOT}/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
At this point Im not sure about the changes have to me made to these files.
I have restarted Apache and nothing changed.
No codes in this question
The public folder must be the root and the Directory must not be visible on the browser. On browser lsapp.test gives OBJECT NOT FOUND! ERROR 404 Also it automatically turns to http://lsapp.test/home