Created
November 29, 2015 13:52
-
-
Save juliojsb/580369297b0d39f2a891 to your computer and use it in GitHub Desktop.
An example of port based Virtual Hosting in Apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VirtualHosting based on ports | |
Listen 80 | |
Listen 81 | |
Listen 82 | |
Listen 83 | |
# Site 1 | |
<VirtualHost *:80> | |
DocumentRoot "/var/www/html/site1" | |
ServerName www.site1.com | |
</VirtualHost> | |
# Site 2 | |
<VirtualHost *:81> | |
DocumentRoot "/var/www/html/site2" | |
ServerName www.site2.org | |
</VirtualHost> | |
# Site 3 | |
<VirtualHost *:82> | |
DocumentRoot "/var/www/html/site3" | |
ServerName www.site3.com | |
</VirtualHost> | |
# Site 4 | |
<VirtualHost *:83> | |
DocumentRoot "/var/www/html/site4" | |
ServerName www.site4.org | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment