Announcement

Collapse
No announcement yet.

Vhosts file

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vhosts file

    A typical httpd-hosts.conf would look something like this
    Code:
    ##</VirtualHost>
    
    ##<VirtualHost *:80>
        ##ServerAdmin webmaster@dummy-host2.example.com
        ##DocumentRoot "C:/xampp/htdocs/dummy-host2.example.com"
        ##ServerName dummy-host2.example.com
        ##ErrorLog "logs/dummy-host2.example.com-error.log"
        ##CustomLog "logs/dummy-host2.example.com-access.log" common
    ##</VirtualHost>
    <VirtualHost *:80>
      ServerName localhost
      ServerAlias localhost
      DocumentRoot "${INSTALL_DIR}/www"
      <Directory "${INSTALL_DIR}/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        #AllowOverride All
        Require local Granted
      </Directory>
    </VirtualHost>
    
    <VirtualHost localhost>
            ServerName vbulletintest.com
            ServerAlias vbulletintest.com
            DocumentRoot "C:/inetpub/vbulletintest"
             <Directory "C:/inetpub/vbulletintest">
            # AllowOverride All      # Deprecated
            # Order Allow,Deny       # Deprecated
            # Allow from all         # Deprecated
    
            # --New way of doing it
            Require all granted    
        </Directory>
        </VirtualHost>
    
        <VirtualHost localhost>
            ServerName database.com
            ServerAlias database.com
            DocumentRoot "C:/inetpub/database"
             <Directory "C:/inetpub/database">
            # AllowOverride All      # Deprecated
            # Order Allow,Deny       # Deprecated
            # Allow from all         # Deprecated
    
            # --New way of doing it
            Require all granted    
        </Directory>
     </VirtualHost>
    
     <VirtualHost localhost>
            ServerName testvb.sportslounge.life
            ServerAlias testvb.sportslounge.life
            DocumentRoot "C:/inetpub/testvb.sportslounge"
             <Directory "C:/inetpub/testvb.sportslounge">
            # AllowOverride All      # Deprecated
            # Order Allow,Deny       # Deprecated
            # Allow from all         # Deprecated
    
            # --New way of doing it
            Require all granted    
        </Directory>
        </VirtualHost>
    
        <VirtualHost localhost>
            ServerName testvb.com
            ServerAlias testvb.com
            DocumentRoot "C:/inetpub/testvb"
             <Directory "C:/inetpub/testvb">
            # AllowOverride All      # Deprecated
            # Order Allow,Deny       # Deprecated
            # Allow from all         # Deprecated
    
            # --New way of doing it
            Require all granted    
        </Directory>
        </VirtualHost>
    
        <VirtualHost localhost>
            ServerName letsgo.com
            ServerAlias letsgo.com
            DocumentRoot "C:/inetpub/letsgo"
             <Directory "C:/inetpub/letsgo">
            # AllowOverride All      # Deprecated
            # Order Allow,Deny       # Deprecated
            # Allow from all         # Deprecated
    
            # --New way of doing it
            Require all granted    
        </Directory>
        </VirtualHost>
    Also remember to edit the hosts file so when you use a friendly name example would be example.com so in the hosts file you would add the following
    Code:
    127.0.0.1  example.com
    127.0.0.1   www.example.com
Working...
X