PHP Web Dev
XAMPP: /htdocs
Add More
Web Folders
NoBetterTechon YouTube
Agenda
XAMPP - Add More Web Folders
•Installation Folder XAMPP
•Default Web Folder: htdocs/
•Add More Web Folders: /htdocs-x/
•Demonstration Run Web Sites In Added Web Folders
2024 2
Introduction
XAMPP - Add More Web Folders
XAMPP (Cross-platform, Apache, MySQL, PHP, Perl)
https://www.apachefriends.org/download.html
WAMP (Windows, Apache, MySQL, PHP)
https://www.wampserver.com/en/
MAMP (Mac/Win, Apache, MySQL, PHP)
https://www.mamp.info/en/downloads/
LAMP (Linux, Apache, MySQL, PHP)
[General] Links at blog post at: www.Paphos.city/101
2024 3
Topic 1
Installation Folder XAMPP
XAMPP - Add More Web Folders 2024 4
Folders
XAMPP Installation Folders
•C:/xampp/
•C:/xampp3.3.2/
•D:/xampp/
•D:/xampp8.3php/
•E:/xampp/
Note: For XAMPP, it isrecommendedto install at the root of a local computer drive.
Default Web Folders
•C:/xampp/htdocs/
•C:/xampp3.3.2/htdocs/
•D:/xampp/htdocs/
•D:/xampp8.3php/htdocs/
•E:/xampp/htdocs/
Note: For XAMPP, you access this web folder with http://localhost/
XAMPP - Add More Web Folders 2024 5
Topic 2
Add More Web Folders - XAMPP
XAMPP - Add More Web Folders 2024 6
More Web Folders Add-0
XAMPP Add More Web Folders
If you have or want another web folder
or more web folders to be included, this
can be done easily, by following the
next steps… Also, this is extremely
helpful if your local web development
folder(s) you want to not move, but
make the web server connect to these
folders… using an alias name.
STEPS (httpd-xampp.conf)
1.D:\xampp8.2\apache\conf\extra\htt
pd-xampp.conf
2.Add the following code block in this
file just above the last line the:
</IfModule>
3.Code block in the next page
4.Restart Apache from
XAMPP CONTROL PANEL
XAMPP - Add More Web Folders
2024 7
More Web Folders Add-1
Code block for httpd-xampp.conf
Alias /repos2 "E:/projects/php -mysql/"
<Directory "E:/projects/php -mysql">
AllowOverride AuthConfig
Require local
</Directory>
Assumptions (httpd- xampp.conf)
1.Your other web folder is at:
E:/projects/php-mysql/
2./repos2
this is repo2 – you can use any name
3.Access the:
E:/projects/php-mysql/
4.With:
http://localhost/repo2/
XAMPP - Add More Web Folders
2024 8
More Web Folders Add-2
Code block for httpd-xampp.conf
Alias /repos5 "H:/projects/php/"
<Directory "H:/projects/php">
AllowOverride AuthConfig
Require local
</Directory>
Assumptions (httpd- xampp.conf)
1.Your other third web folder is at:
H:/projects/php/“
2./repos5
this is repo5 – you can use any name
3.Access the:
H:/projects/php/
4.With:
http://localhost/repo5/
XAMPP - Add More Web Folders
2024 9
Content
TIPs & Tricks
•Alias /XYZ
should be unique [different between] for each
additional folder.
•Every change to setup & conf files of XAMPP
requires: Apache RESTART from XAMPP CONTROL
PANEL
•ACCESS
http://localhost/
the default web folder
Others via Alias used XYZ-x
http://localhost/XYZ-1/
http://localhost/XYZ-2/
http://localhost/XYZ-3/
•If you have a folder in conf file but Not found e.g. deleted it, your XAMPP may fail to Start till you remove
the code for this deleted folder at: httpd-xampp.conf.
Other Need Attention
•For XAMPP, it is recommended to
install it at the root of a local
computer drive:
As says in Page 5 of this slides
•Download XAMPP from:
https://www.apachefriends.org/download.html
•Follow this Presentation Windows
PC Share Screen Demonstration…
XAMPP - Add More Web Folders
2024 10
Summary
XAMPP, WAMP, MAMP, and LAMP are
popular software stacks used to set up
local web servers on Windows, macOS,
or Linux systems for Web Development
[PHP/MySQL/JS/CSS/HTML] and testing.
To Add another Local Web Development
Folder process for XAMPP as here, this
should be identical to the other
offerings:
WAMP, MAMP, and LAMP.
XAMPP - Add More Web Folders
2024 11
Thank you
LSE Email: [email protected]
www.Paphos.city
www.Polis.town
Blog Post here:
www.Paphos.city/101
XAMPP - Add More Web Folders 2024 12