Jak zmienić port Apache w XAMPP
open the "httpd.conf" file, This file should be found in C:\xampp\apache\conf on Windows or in bin/apache in xampp directory for Linux
and replace following lines :
Listen 80
ServerName localhost:80
if you want to use port 5000
Listen 5000
ServerName localhost:5000
Laciaf