phpstudy配置虚拟域名

之前有一篇使用xampp配置虚拟域名,但是不同公司使用的集成环境不同,(xampp是我自己用的,别误解(><) !)这次使用的phpstudy,相比较而言,phpstudy更简单一点

首先下载phpstudy,地址https://pan.baidu.com/s/1UEqpwA_dgUASLWYmCRZJjA,提取码d7b1

安装就不用说了吧,一步步操作

1- 打开phpstudy

设置运行模式为系统服务,依次点击MySQL管理器,选择站点域名管理

2- 配置虚拟域名

网站域名填写需要配置的虚拟域名,网站目录选择该域名所对应的文件夹,默认打开文件夹下index.html保存完成之后返回第一步

3- 依次点击其他选项菜单——>打开host

在host文件夹最下面加入这一行(后面域名要与你配置的虚拟域名一致)

127.0.0.1 www.xueshuai.com

可能host文件下没有内容,则需要填入如下代码(补充一句,host的路径在:C:WindowsSystem32driversetc

# Copyright (c) 1993-1999 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
127.0.0.1 localhost

博主信息:

昵称:HamyFrank

网站:我的网站

邮箱: xueshuai_12@163.com

QQ:246776020

QQ群:1063233592

WeChat:js_cool_100

原文地址:https://www.cnblogs.com/xue-shuai/p/12000627.html