Apache zend框架的程序 虛擬機設置 ------windows下

<VirtualHost *:80>
        ServerName 域名
        ServerAlias 域名別名
        DocumentRoot D:/program_code/php/xxxxxx/public
        <Directory "D:/program_code/php/xxxxxx/public">
        AllowOverride All
                Options All
        </Directory>
        RewriteEngine On
        RewriteCond %{REQUEST_URI} !^.*(/.css|/.js|/.gif|/.png|/.jpg|/.jpeg)$
        RewriteRule ^(/.*)$ /index.php
</VirtualHost>

 

/windows/system32/dirvers/etc/hosts 文件添加:

127.0.0.1 域名

 

--------------------------------------------普通虛擬目錄設置-----------------------------------------

<Directory "D:/testSpace/my/">
        AllowOverride All
        Allow from all
        Options   Indexes   FollowSymLinks
</Directory>

其中 Indexes   FollowSymLinks  如果沒有索引文件比如:index.html,index.php,index.htm的話,會顯示整個目錄下的所有內容

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章