Set Up Web Development LAMP Stack Using XAMPP on Windows.

Download XAMPP

Run Installer

Note: Windows IIS and Skype use port 80. I find it better to change the port number to 8080 for LAMP development.

Changing port number for virtual hosts

Open text editor Run as administrator

Navigate to File/Open/Local Disk(C:/Windows/System32/drivers/etc, click All Files, open hosts, add

127.0.0.1       server_name
bellow local host. Add additional hosts as needed. Save file and add no file extension and UTF-8.

Navigate to File/Open/Local Disk(C:/xampp/apache/conf/extra, click All Files, open httpd-vhosts.conf. Add below code block below # configuration.


<Directory C:/vhosts>   
Require all granted 
</Directory>
           

Uncomment

#NameVirtualHost *:80 
by removing pound sign and change port 80 to 8080

Add second code block for every virtual host you add along with correct file path were files will be served from.


<virtualHost *:8080>
    DocumentRoot C:/xampp/htdocs
    ServerName localhost
</VirtualHost>

<virtualHost *:8080>
    DocumentRoot C:/vhosts/server_name
    ServerName server_name
</VirtualHost>

Save File UTF-8

Navigate to File/Open/Local Disk(C:/xampp/apache/conf. Select All Files. Open httpd.conf.

Search for 80 using Ctrl f and change port 80 to 8080. There is only 2 that need to be changed "Listen 80" and "ServerName localhost:80".

Save file UTF-8.

Open XAMPP Control Panel and restart Apache.

Note: If you are getting a 403 Access Forbidden error message, open the XAMPP control panel, click the Config button, select httpd-conf, find


<Directory/>
    AllowOverride none
    Require all denied
</Directory>
    
change to

<Directory/>
    AllowOverride none
    Require all granted
</Directory>

restart Apache.

Documentation, will work after editing config files to port 8080 XAMPP

Reset the MySQL/MariaDB Root Password, will work after editing config files to port 8080 XAMPP


© 2017 Camero Jones