phpstudy linux 站点域名配置

之前一直没有在linux上配置过项目,这两天配置,在网上也没有找到完整的配置步骤,phpstudy的官网小皮面板的文档讲解的也不是很清楚,导致配置浪费了很多时间,总体配置过程其实和windows差不多。
一、phpstudy 配置步骤

  1. 下载phpstudy, 我本人用的是Centos
    Centos安装脚本 yum install -y wget && wget -O install.sh https://download.xp.cn/install.sh && sh install.sh
    Ubuntu安装脚本 wget -O install.sh https://download.xp.cn/install.sh && sudo bash install.sh
    phpstudy linux 站点域名配置
  2. 将项目上传到你指定的目录,本人将项目都是放在www目录下
    phpstudy linux 站点域名配置
    注:如果项目在本地window中,想要上传至Linux系统,可以使用SSH Secure File Transfer Client软件
  3. 在小皮面板中配置站点域名
    phpstudy linux 站点域名配置
    phpstudy linux 站点域名配置
  4. 进入/etc,vi hosts文件,将本次域名加入hosts文件
    phpstudy linux 站点域名配置
  5. 新增/修改配置, xp ->3 重启phpstudy
  6. 然后在Centos自带的firefox中测试,能否访问。

二、配置中遇到的问题
1.Centos ip是动态分配的,每次虚拟机休眠后,重新进来又会重新分配IP,导致小皮面板的经常访问不了