Datasheet
Book VIII
Chapter 1
Managing Your
Servers
875
Creating Your Own Server with XAMPP
htdocs directory. You didn’t specify a particular file to load. If Apache isn’t
given a filename and it sees the file named index.html or index.php, it
displays that file, instead. So, in the default htdocs directory, the index.
php program is immediately being called. Although this program displays
the XAMPP welcome page, you don’t usually want that to happen.
Rename index.php to index.php.old or something similar. It’s still there
if you want it, but now there’s no index page, and Apache simply gives you a
list of files and folders in the current directory. Figure 1-3 shows my local
host directory as I see it through the browser.
Figure 1-3:
After
disabling
index.php,
I can see
a list of
files and
directories.
You typically don’t want users to see this ugly index in a production server,
but I prefer it in a development environment so that I can see exactly what’s
on my server. After everything is ready to go, I put together index.html or
index.php pages to generate more professional directories.
Generally, you want to have subdirectories to all your main projects. I added
a few others for my own use, including xfd, which contains all the code for
this book.
If you want to display the XAMPP welcome screen after you remove the
index.php program, simply point your browser to http://localhost/
xampp.
53_9780470537558-bk08ch01.indd 87553_9780470537558-bk08ch01.indd 875 10/7/10 8:58 PM10/7/10 8:58 PM