Setting up a VirtualHost on a different port

To create a virtual host you can follow this example:

(i’ll be using port 9901)

Listen 9901
<VirtualHost *:9901>

ServerName projectname.local

DocumentRoot “/link/to/projectfodler/”

</VirtualHost>

 

You’ll need “listen port number” to tell apache to listen to what port you specified

source:

https://httpd.apache.org/docs/2.4/vhosts/examples.html

Leave a comment