中文字幕第五页-中文字幕第页-中文字幕韩国-中文字幕最新-国产尤物二区三区在线观看-国产尤物福利视频一区二区

教你如何用apache同ip多站點架設

2023-05-27    分類: 網站建設

這里是指同一IP綁定N個域名,有二種方式實現
方法1、僅修改httpd.conf
假設二個域名bbs.xxx.com與blog.xxx.com
打開httpd.conf
將文件拖到下面,加上

view plaincopy to clipboardprint?

ServerName bbs.xxx.com #域名
DocumentRoot "F:/website/bbs" #該域名對應的目錄地址
#該節點是配置權限、默認首頁啊等等東東。
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

ServerName blog.xxx.com
DocumentRoot "D:/PHPSite/wordpress"

Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

ServerName bbs.xxx.com #域名
DocumentRoot "F:/website/bbs" #該域名對應的目錄地址
#該節點是配置權限、默認首頁啊等等東東。
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

ServerName blog.xxx.com
DocumentRoot "D:/PHPSite/wordpress"

Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

重啟apache,就OK啦。當然你要修改你的hosts文件。

方法2、修改/PhpServer/Apache2.2/conf/extra/httpd-vhosts.conf
直接將上面一段copy到httpd-vhosts.conf的后即可。
實際上看名字就知道httpd-vhosts.conf是一個虛擬站點配置集中地,方便管理。
也就是如下:
view plaincopy to clipboardprint?
#
# Virtual Hosts
#
# 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
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# 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 block.
#

ServerName bbs.xxx.com #域名
DocumentRoot "F:/website/bbs" #該域名對應的目錄地址
#該節點是配置權限、默認首頁啊等等東東。
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

ServerName blog.xxx.com
DocumentRoot "D:/PHPSite/wordpress"

Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

#
# Virtual Hosts
#
# 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
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# 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 block.
#

ServerName bbs.xxx.com #域名
DocumentRoot "F:/website/bbs" #該域名對應的目錄地址
#該節點是配置權限、默認首頁啊等等東東。
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

ServerName blog.xxx.com
DocumentRoot "D:/PHPSite/wordpress"

Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all

重啟apache。
如果不行的話,看你的httpd.conf是否啟用了vhost
打開httpd.conf,找到
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
看是否啟用,即去掉Include conf/extra/httpd-vhosts.conf前的#
重啟apache,爽去吧。

網頁題目:教你如何用apache同ip多站點架設
本文地址:http://m.2m8n56k.cn/news34/260784.html

成都網站建設公司_創新互聯,為您提供網站改版網站設計公司ChatGPTGoogle外貿網站建設靜態網站

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

商城網站建設
主站蜘蛛池模板: 久热香蕉在线视频 | 久久久久依人综合影院 | 秘书高跟黑色丝袜国产91在线 | 国产性做久久久久久 | 欧美一级成人毛片视频 | 中文字幕精品一区二区2021年 | 国产成人精品magnet | 久久精品国产一区二区 | 一级毛片免费不卡 | 日韩欧美理论片 | 国产成人在线视频免费观看 | 成人在线视频国产 | 国产精品亚洲专一区二区三区 | 成人网18免费看 | 久久99毛片免费观看不卡 | 亚洲国内自拍 | 国产免费黄视频 | 77yyxf影音先锋 | 日韩精品不卡 | 99视频精品全国免费 | 久久毛片免费看一区二区三区 | 久久香蕉国产精品一区二区三 | 麻豆国产96在线 | 中国 | 国产美女白丝袜精品_a不卡 | 亚洲国产欧美在线人成aaa | 欧美一级特黄特黄做受 | 99色在线视频 | 欧美日韩高清在线观看一区二区 | 免看一级a一片成人123 | 免费特黄级夫费生活片 | 欧美日韩在线永久免费播放 | 欧美日本免费观看αv片 | 中文字幕在线一区二区三区 | 经典三级久久久久 | 日本一区二区三区欧美在线观看 | 97视频免费上传播放 | 成人自拍视频 | 亚洲午夜久久 | 在线观看偷拍视频一区 | 国产午夜小视频 | 草草影院ccyycom |