Questions from trouble getting the UniFi Controller to work on macOS High Sierra + Server (port 8080 in use)
Yes, you can safely change the port in

/etc/apache2/httpd.conf 


and the default page with "It works!" comes from

/Library/WebServer/Documents