Apache 2.x 基于主机名的虚拟主机

NameVirtualHost *:80

<VirtualHost *:80>
ServerName a.lostk.com
DocumentRoot e:/webserver/htdocs/a
ErrorLog e:/webserver/apache/logs/a.lost-error.log
CustomLog e:/webserver/apache/logs/a.lost-access.log common
    <Directory "e:/webserver/htdocs/a">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName b.lostk.com
DocumentRoot e:/webserver/htdocs/b
ErrorLog e:/webserver/apache/logs/b.lost-error.log
CustomLog e:/webserver/apache/logs/b.lost-access.log common
    <Directory "e:/webserver/htdocs/b">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Tags: apache, http, 虚拟主机

相关日志

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

还没有评论。

发表评论

(必填)

(必填)


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comment moderation is enabled. Your comment may take some time to appear.