中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

如何配置Apache服務器中的虛擬機

發布時間:2021-11-06 09:46:15 來源:億速云 閱讀:94 作者:柒染 欄目:建站服務器

這篇文章將為大家詳細講解有關如何配置Apache服務器中的虛擬機,文章內容質量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關知識有一定的了解。

1

## 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# <URL:http://httpd.apache.org/docs/2.2/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.## 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 <VirtualHost> block.#<VirtualHost *:80>#管理員郵箱ServerAdmin jiangfeng3@staff.sina.com.cn #項目根目錄 DocumentRoot "D:/htdocs/frame_export" #域名 ServerName test.t.sina.com.cn #別名 ServerAlias test.t.sina.com.cn#錯誤日志路徑ErrorLog "logs/test.t.sins.com.cn-error.log"CustomLog "logs/test.t.sins.com.cn-access.log" commonRewriteEngine on#重寫規則,可根據實際需要添加RewriteRule ^/(.*)$ /apps/index.php [L]</VirtualHost>

4、編輯本地host文件,以windows為例

進入C:/Windows/System32/drivers/etchttp://www.bbqmw.net/

記事本打開hosts文件

最后添加

127.0.0.1 localhost
127.0.0.1 test.t.sina.com.cn

例子:

1

# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS file used by Microsoft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name denoted by a '#' symbol.## For example:## 102.54.94.97 rhino.acme.com # source server# 38.25.63.10 x.acme.com # x client host# localhost name resolution is handled within DNS itself.127.0.0.1 localhost# ::1 localhost127.0.0.1 test.t.sina.com.cn

關于如何配置Apache服務器中的虛擬機就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

汶上县| 偏关县| 日照市| 马关县| 泸水县| 黄龙县| 南乐县| 宜都市| 千阳县| 泗阳县| 石渠县| 枣阳市| 澜沧| 三明市| 东至县| 攀枝花市| 陆丰市| 墨脱县| 财经| 三原县| 河北省| 滕州市| 神农架林区| 宜兰县| 姜堰市| 灵璧县| 中江县| 东安县| 镇安县| 察隅县| 武定县| 岑巩县| 崇州市| 邵东县| 厦门市| 双江| 老河口市| 霍林郭勒市| 丰县| 渭源县| 云安县|