Quantcast
Channel: 丁才軒討論站
Viewing all articles
Browse latest Browse all 72

網路與網站知識 • apache vhost 範例

$
0
0
C:\Apache24\conf\httpd.conf 設定

CODE:

# Virtual hostsInclude conf/extra/httpd-vhosts.conf
-----------------
C:\Apache24\conf\extra\httpd-vhosts.conf

CODE:

# Virtual Hosts## Required modules: mod_log_config# If you want to maintain multiple domains/hostnames on your# machine you can setup VirtualHost containers for them. Most configurations# use only name-based virtual hosts so the server doesn't need to worry about# IP addresses. This is indicated by the asterisks in the directives below.## Please see the documentation at # <URL:http://httpd.apache.org/docs/2.4/vhosts/># for further details before you try to setup virtual hosts.## You may use the command line option '-S' to verify your virtual host# configuration.## VirtualHost example:# Almost any Apache directive may go into a VirtualHost container.# The first VirtualHost section is used for all requests that do not# match a ServerName or ServerAlias in any <VirtualHost> block.#<Directory "D:/Inetpub/ocs">    Options FollowSymLinks Includes ExecCGI    AllowOverride All    Require all grantedDirectoryIndex index.html index.htm index.php</Directory><Directory "D:/Inetpub/wwwroot">    Options Indexes FollowSymLinks Includes    AllowOverride All    Require all granted</Directory><VirtualHost *:80>    ServerAdmin dtchang@chu.edu.tw    DocumentRoot "D:/Inetpub/wwwroot"    ServerName sun.im.chu.edu.tw    ServerAlias sun.im.chu.edu.twAlias /ocs/ "D:/Inetpub/ocs/"    ErrorLog "logs/sun.im.chu.edu.tw.log"#CustomLog "logs/sun.im.chu.edu.tw_log.log" common    CustomLog "|bin/rotatelogs.exe -l logs/sun_im_access.%Y.%m.%d.log 10M" common</VirtualHost><VirtualHost *:80>    ServerAdmin dtchang@chu.edu.tw    DocumentRoot "D:/Inetpub/chuexten/web"    ServerName iu.adm.chu.edu.tw    ServerAlias iu.adm.chu.edu.tw    ErrorLog "D:/Inetpub/chuexten/logs/iu.adm.chu.edu.tw_error.log"   CustomLog "D:/Inetpub/chuexten/logs/iu.adm.chu.edu.tw_log.log" common#  CustomLog "|bin/rotatelogs.exe -l D:/Inetpub/chuexten/logs/iu_adm_access.%Y.%m.%d.log 10M" common<Directory "D:/Inetpub/chuexten/web">    Options Indexes FollowSymLinks    AllowOverride All    Require all granted</Directory></VirtualHost>

統計資料: 發表於 由 dtchang — 2018-09-10, 11:39



Viewing all articles
Browse latest Browse all 72

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>