xiayu 发表于 2015-8-5 12:48:01

关于Apache多个工程域名的配置

Apache httpd.conf的配置


NameVirtualHost *:8001

    ServerAdmin   test@sina.com
    DocumentRootD:\projects\mfull_renewal\webapp\htdocs\i
    ServerName    test
    ErrorLog      logs/error_log.mj
    CustomLog   logs/access_log.mj common
   
    php_flag output_buffering On
    php_value output_handler mb_output_handler
    php_value default_charset Shift_JIS
    php_value mbstring.language Japanese
    php_flag mbstring.encoding_translation On
    php_value mbstring.http_input auto
    php_value mbstring.http_output Shift_JIS
    php_value mbstring.internal_encoding Shift_JIS
    php_value mbstring.substitute_character none

#可以配置多个 ,
#NameVirtualHost *:8001
#
# ...
#

    配置C:\WINDOWS\system32\drivers\etc\hosts 的配置

   

127.0.0.1       localhost
192.168.1.106   test
#可配置多个
#192.168.1.106 wolf.com
# ...

    访问此工程只需要:http:\\test\index.html 就OK了
页: [1]
查看完整版本: 关于Apache多个工程域名的配置