Prev | Current Page 89 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"


Open the Apache configuration file (httpd.conf), find the aliases section (which is defined by the
configuration tag), and add the following lines:

# ...
# Configure the tshirtshop alias
Alias /tshirtshop/ "C:/tshirtshop/"
Alias /tshirtshop "C:/tshirtshop"


Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

After adding these lines and restarting the Apache web server, a request for http://localhost/tshirtshop
or http://localhost/tshirtshop/ will load the application in the tshirtshop folder (once it exists).
3. Create a file named test.php in the tshirtshop folder, with the following line inside:

4. Restart the Apache web server (the easiest way to do this is by using the XAMPP Control Panel). Restarting
the server is necessary, because we??™ve made changes to the Apache configuration file.
5. Load http://localhost/tshirtshop/test.php (or http://localhost:8080/tshirtshop/test.php
if Apache works on port 8080) in a web browser.
CHAPTER 3 ?–  STARTING THE TSHIRTSHOP PROJECT 35
Exercise: Preparing the tshirtshop Alias on Linux Systems
1. Create a new folder named tshirtshop, which will be used for all the work you??™ll do in this book. You
might find it easiest to create it in your home directory (in which case the complete path to your tshirtshop
folder will be something like /home/username/tshirtshop), but because we??™ll use relative paths in the
project, feel free to create it in any location.


Pages:
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101