設定VirtualHost給zf project

  • 於httpd.conf定義新的VirtualHost - 直接當Root時
  • <VirtualHost *:81>

        ServerName localhost

        DocumentRoot "C:\Program Files\Zend\Apache2\htdocs\ProjectName\public"

        SetEnv APPLICATION_ENV "development"

        <Directory "C:\Program Files\Zend\Apache2\htdocs\ProjectName\public">

            DirectoryIndex index.php

            AllowOverride All

            Order allow,deny

            Allow from all

        </Directory>

    </VirtualHost>

     

  • 定義新的Port記得需要額外Listen該Port
  • Listen 81

     

  • 設定好記得重新啟動apache

沒有留言:

橫式廣告