xampp: localhost shows index of / instead of index.html file

Problems with the Linux version of XAMPP, questions, comments, and anything related.

xampp: localhost shows index of / instead of index.html file

Postby growingUpShy » 23. July 2017 16:59

all servers are running fine
but when i type localhost on my browser it shows index of / directory and i can not get my files to run from htdocs
can anyone help me
growingUpShy
 
Posts: 1
Joined: 23. July 2017 16:47
XAMPP version: 7
Operating System: manjaro linux

Re: xampp: localhost shows index of / instead of index.html

Postby Threecats » 01. August 2017 15:34

My understanding is that Apache serves up anything called 'index' on entering a directory. On my setup, the 'htdocs' folder contains an 'index.php' script, that creates the 'Dashboard' page when run.

Just create a sub-directory in the 'htdocs' directory, and anything called 'index.html' or 'index.php' will be automatically run once Apache opens that directory.

Also, remember that you need to include the full path to the script you want to run in the address bar of your browser. For example, if the script you wanted to run was called 'login.php', and it was in a directory called 'sesame', you'd need to use the following filepath:

http://localhost/sesame/login.php
Threecats
 
Posts: 7
Joined: 29. March 2016 13:34
Operating System: Xubuntu 14.04.4 LTS


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests