欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

教你如何用apache同ip多站點(diǎn)架設(shè)

2023-05-27    分類: 網(wǎng)站建設(shè)

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

view plaincopy to clipboardprint?

ServerName bbs.xxx.com #域名
DocumentRoot "F:/website/bbs" #該域名對(duì)應(yīng)的目錄地址
#該節(jié)點(diǎn)是配置權(quán)限、默認(rèn)首頁(yè)啊等等東東。
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" #該域名對(duì)應(yīng)的目錄地址
#該節(jié)點(diǎn)是配置權(quán)限、默認(rèn)首頁(yè)啊等等東東。
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啦。當(dāng)然你要修改你的hosts文件。

方法2、修改/PhpServer/Apache2.2/conf/extra/httpd-vhosts.conf
直接將上面一段copy到httpd-vhosts.conf的后即可。
實(shí)際上看名字就知道httpd-vhosts.conf是一個(gè)虛擬站點(diǎn)配置集中地,方便管理。
也就是如下:
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" #該域名對(duì)應(yīng)的目錄地址
#該節(jié)點(diǎn)是配置權(quán)限、默認(rèn)首頁(yè)啊等等東東。
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" #該域名對(duì)應(yīng)的目錄地址
#該節(jié)點(diǎn)是配置權(quán)限、默認(rèn)首頁(yè)啊等等東東。
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,爽去吧。

網(wǎng)頁(yè)題目:教你如何用apache同ip多站點(diǎn)架設(shè)
本文地址:http://chinadenli.net/news34/260784.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版、網(wǎng)站設(shè)計(jì)公司、ChatGPT、Google、外貿(mào)網(wǎng)站建設(shè)靜態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

商城網(wǎng)站建設(shè)
精品一区二区三区中文字幕 | 少妇在线一区二区三区| 成年人免费看国产视频| 亚洲中文字幕有码在线观看| 暴力三级a特黄在线观看| 国产午夜精品福利免费不| 天海翼精品久久中文字幕| 国产真人无遮挡免费视频一区| 欧美午夜国产在线观看| 亚洲综合伊人五月天中文| 精品丝袜一区二区三区性色| 九九视频通过这里有精品| 国产午夜在线精品视频| 日韩精品一级片免费看| 国产又猛又大又长又粗| 国产精品欧美激情在线观看| 久久99爱爱视频视频| 成人精品视频一区二区在线观看 | 欧美自拍系列精品在线| 好吊视频有精品永久免费| 日韩午夜老司机免费视频 | 免费在线观看欧美喷水黄片| 日韩日韩欧美国产精品| 国产一区二区三区香蕉av| 亚洲国产91精品视频| 不卡视频免费一区二区三区| 高清一区二区三区不卡免费| 亚洲精品熟女国产多毛 | 一区二区日韩欧美精品| 视频一区日韩经典中文字幕| 中文字幕乱子论一区二区三区| 国产亚洲精品岁国产微拍精品 | 韩国日本欧美国产三级 | 国产又大又猛又粗又长又爽| 亚洲男人的天堂久久a| 日韩欧美好看的剧情片免费| 久久99精品日韩人妻| 黄色片一区二区在线观看| 亚洲妇女黄色三级视频| 永久福利盒子日韩日韩| 久久精品国产亚洲av久按摩|