第一部分:上传代码

使用ftp根工具进行上传代码

第二部分:路径设置

在/etc/apache2/sites-available进行配置

大体设置

<VirtualHost *:80>ServerAdmin webmaster@localhostServerName public.localhost.itDocumentRoot  /var/www/public/public# SetEnv APPLICATION_ENV "develop"<Directory  /var/www/public/public>DirectoryIndex index.php index.htmlAllowOverride AllOrder allow,denyAllow from all# Require all granted</Directory>ErrorLog ${APACHE_LOG_DIR}/error.logCustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

设置完毕后:进行激活+重启Apache

激活虚拟主机配置:sudo a2ensite

重启Apache:sudo /etc/init.d/apache2 restart

第三部分:Win设置

在host设置,进行连接虚机IP与域名

#编程自学的域名
#127.0.0.1      localhost
127.0.0.1       local.html.com
127.0.0.1       local.css.com
127.0.0.1       local.js.com
127.0.0.1       local.bootstrap.com
#127.0.0.1      local.wordpress.com
127.0.0.1       local.map.com
127.0.0.1       local.jquery.com
127.0.0.1       local.support.com
127.0.0.1       local.public.com
127.0.0.1       local.faq.com
127.0.0.1       local.pay.com
127.0.0.1       local.pay2.com
127.0.0.1       local.tp.com
127.0.0.1       local.admin.com
127.0.0.1       local.yii.com
127.0.0.1       local.ci.com
127.0.0.1       local.mi.com#系统Debian项目Sharengo的域名
192.168.216.130     public.localhost.it
192.168.216.130     admin.localhost.it
192.168.216.130     wordpress.localhost.it
192.168.216.130     support.linux.com

vhost配置

#127.0.0.1       localhost
#127.0.0.1      local.html.com
#127.0.0.1      local.css.com
#127.0.0.1      local.js.com
#127.0.0.1      local.bootstrap.com
#127.0.0.1      local.wordpress.com
#127.0.0.1      local.map.com
#127.0.0.1    local.jquery.com
#127.0.0.1      local.support.com
#127.0.0.1      local.public.com
#127.0.0.1      local.faq.com#去wordpress文件夹
<VirtualHost *:80>ServerName local.wordpress.comDocumentRoot "D:\phpStudy\WWW\wordpress"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\wordpress">DirectoryIndex index.phpAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#去测试页面的
<VirtualHost *:80>ServerName local.test.comDocumentRoot "D:\phpStudy\WWW\test"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\test">DirectoryIndex index.phpAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#去map页面的
<VirtualHost *:80>ServerName local.map.comDocumentRoot "D:\phpStudy\WWW\map"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\map">DirectoryIndex index.php index.htmlAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#去jquery页面的
<VirtualHost *:80>ServerName local.jquery.comDocumentRoot "D:\phpStudy\WWW\jquery"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\jquery">#DirectoryIndex index.php index.htmlAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#去support页面的
<VirtualHost *:80>ServerName local.support.comDocumentRoot "D:\phpStudy\WWW\support"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\support">#DirectoryIndex index.php index.htmlAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#去文件夹html
<VirtualHost *:80>ServerName local.html.comDocumentRoot "D:\phpStudy\WWW\html"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\html">#DirectoryIndex index.htmlAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入admin的
<VirtualHost *:80>ServerName local.admin.comDocumentRoot "D:\phpStudy\WWW\admin\public"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\admin\public">#DirectoryIndex index.phpAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入public
<VirtualHost *:80>ServerName local.public.comDocumentRoot "D:\phpStudy\WWW\public\public"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\public\public">#DirectoryIndex index.html index.phpAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入问答项目的
<VirtualHost *:80>ServerName local.faq.comDocumentRoot "D:\phpStudy\WWW\faq"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\faq">#DirectoryIndex index.html index.phpAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入pay的
<VirtualHost *:80>ServerName local.pay.comDocumentRoot "D:\phpStudy\WWW\pay"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\pay">#DirectoryIndex index.html index.phpAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入pay2的
<VirtualHost *:80>ServerName local.pay2.comDocumentRoot "D:\phpStudy\WWW\pay2"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\pay2">#DirectoryIndex index.html index.phpAllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入tp的
<VirtualHost *:80>ServerName local.tp.comDocumentRoot "D:\phpStudy\WWW\tp"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\tp">#DirectoryIndex index.html index.php#是否允许外界进行访问您的网站AllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入blogdemo2
<VirtualHost *:80>ServerName local.yii.comDocumentRoot "D:\phpStudy\WWW\blogdemo2"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\blogdemo2">DirectoryIndex index.html index.php#是否允许外界进行访问您的网站AllowOverride AllRequire all granted</Directory>
</VirtualHost>
#进入ci
<VirtualHost *:80>ServerName local.ci.comDocumentRoot "D:\phpStudy\WWW\ci"SetEnv APPLICATION_ENV "development"<Directory "D:\phpStudy\WWW\ci">DirectoryIndex index.html index.php#是否允许外界进行访问您的网站AllowOverride AllRequire all granted</Directory>
</VirtualHost>

httpd.conf

DocumentRoot  "D:\phpStudy\WWW"
<Directory />Options +Indexes +FollowSymLinks +ExecCGIAllowOverride AllOrder allow,denyAllow from allRequire all granted
</Directory>

第四部分:访问

Linux之Server环境配置相关推荐

  1. vs在linux下的环境搭建,linux下vscode环境配置

    文章目录 linux下vscode环境配置 编译器,调试器安装 sudo apt update #通过以下命令安装编译器和调试器 sudo apt install build-essential gd ...

  2. Linux系统网络环境配置(初学者必看)!!

    Linux系统网络环境配置 大家好,我是作者小白,很高兴在这里跟大家分享在Linux初学者必须经历的一个问题,那就是在VM Ware中网络环境配置,步骤很简单,相信你看一遍就能立马上手,那我们开始吧! ...

  3. linux服务器python环境配置+pycharm连接服务器操作

    普天同庆!!!从原来啥也不懂一直拖着想着等返校后问同学怎么操作,到现在迫于无奈需要训练只能自己配置,耗时半天终于搞明白了!!!(大神永远不懂小白的痛) 目录 1.linux服务器环境配置 1.1 安装 ...

  4. linux深度学习环境配置随笔

    零.使用华为云服务器安装深度学习环境 购买云服务器后进入控制中心 远程登录服务器 这里有几种登录方法,本文使用xshell进行登录. 一.cuda.cudnn安装 参考:Linux下安装cuda和对应 ...

  5. linux iis 环境配置教程,Linux系统Java环境配置教程

    1.卸载Linux系统自带的JDK 我们要删除掉自带的JDK环境 再次查询是否已经删除 2.安装自己下载的JDK 2.1 下载JDK,地址: http://www.oracle.com/technet ...

  6. 【个人总结】基于项目的AI Studio平台下Linux深度学习环境配置心得

    更新一下:现在AI Studio应该已经不能用其他深度学习框架了,用一会儿就会中断 前言 PS:本部分主要是对本周工作的总结,标题对应的内容可以跳过本部分 上周主要的工作是研究了一下项目utils文件 ...

  7. Linux系统安装jdk11环境配置

    Java11是jdk环境中一个比较经典的版本,下面介绍一下 CentOS 8 系统如何手动自定义安装配置jdk11环境变量 一.下载 jdk 的tar包到指定的目录下 1.命令如下: wget htt ...

  8. linux系统开发环境配置

    2019独角兽企业重金招聘Python工程师标准>>> 官方下载jdk地址 http://www.oracle.com/technetwork/java/javase/downloa ...

  9. linux的java环境配置,jdk,tomcat,redis,maven,mysql

    资源:https://pan.baidu.com/s/1WqJDVhvq4PD8z32pIE1-xw 1:安装jdk 下载jdk tar zxvf jdk-8u181-linux-x64.tar.gz ...

最新文章

  1. html实体编码遇上js代码
  2. Jquery DataTable控制显示列,导出EXCEL
  3. 网页版登录入口_企业微信网页版怎么登录?企业微信客户端和网页版有什么区别?...
  4. Silver Cow Party POJ - 3268(dijkstra+反向交换)
  5. Java游戏触屏处理,非触屏java游戏转换为触屏游戏工具使用方法
  6. Linux7没有网卡,centos7安装后缺少网卡如何解决?
  7. Word2013出现未响应的解决方法
  8. 蚂蚁金服红蓝军技术攻防演练究竟有多“狠”
  9. Love Letter
  10. tomcat加白名单_[WebServer] Tomcat 配置访问限制:访问白名单和访问黑名单
  11. winsxs探索之组件的本质:文件与注册表
  12. 2022高频面试题之css篇
  13. python小白入门第二课-标识符数据类型字符串方法
  14. 苹果开发者账号添加设备
  15. 网站被流量攻击怎么处理
  16. Spring 注解读取配置文件
  17. WIFI的2.4GHz与5GHz频段,并非5GHz穿墙能力更差
  18. Rextrofit中网络请求空字段传递或过滤
  19. 图形学笔记(五)——曲线
  20. UpdateNet -- 大致理解

热门文章

  1. 相似度算法(http://blog.sina.com.cn/s/blog_62b83291010127bf.html)
  2. Mysql函数示例(如何定义输入变量与返回值)
  3. Qt使用OpenCV读取图片练习
  4. tf.boolean_mask()的详细用法
  5. Scikit-learn 概述
  6. [转]httpclient编码
  7. 腾讯云主机Python3环境安装PySpider爬虫框架过程
  8. Jenkins执行批处理文件失败
  9. Struts2文件上传的大小限制问题
  10. 被忽视但很实用的那部分SQL