How to set up virtual hosts on Apache 2.2

前端 未结 2 654
礼貌的吻别
礼貌的吻别 2021-01-03 09:03

Can anyone direct me to a good tutorial on how to set up virtual hosts using Apache 2.2? Here\'s my situation:

I have Apache running on my laptop and I want two web

2条回答
  •  孤街浪徒
    2021-01-03 09:42

    First you need to instruct Apache to listen on the ports you need:

    Listen 80
    Listen 8089
    

    Second you need to tell it what to do with 80 and 8089 traffic:

    
        DocumentRoot /website/site80
        ServerName internet.dev
    
    
    
        DocumentRoot /website/site8089
    
    

    Third you need to "allow" Apache to use those directories:

    
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    
    
    
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    
    

提交回复
热议问题