一个阿里云apache服务器配置两个或多个域名forLinux
一个阿里云apache服务器配置两个或多个域名for Linux:
默认已经配置好了阿里云提供的一键web安装,可以参考:http://www.42iot.com/?id=8
修改/alidata/server/httpd/conf/vhosts下的文件phpwind.conf
打开phpwind.conf命令:vi phpwind.conf
在后面添加红色标记部分(以jiajiao2.kechengliu.com为例,目录为/alidata/www/jiajiao)
<DirectoryMatch "/alidata/www/phpwind/(attachment|html|data)">
<Files ~ ".php">
Order allow,deny
Deny from all
</Files>
</DirectoryMatch> <VirtualHost *:80>
DocumentRoot /alidata/www/phpwind
ServerName localhost
ServerAlias localhost
<Directory "/alidata/www/phpwind">
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)-htm-(.*)$ .php?
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ /simple/index.php?
</IfModule>
ErrorLog "/alidata/log/httpd/phpwind-error.log"
CustomLog "/alidata/log/httpd/phpwind.log" common
</VirtualHost> <font color="#ff0000"><VirtualHost *:80>
DocumentRoot /alidata/www/jiajiao
ServerName jiajiao2.kechengliu.com
ServerAlias jiajiao2.kechengliu.com
<Directory "/alidata/www/jiajiao">
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)-htm-(.*)$ .php?
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ /simple/index.php?
</IfModule>
ErrorLog "/alidata/log/httpd/jiajiao-error.log"
CustomLog "/alidata/log/httpd/jiajiao.log" common
</VirtualHost></font>
3.输入命令:/alidata/server/httpd/bin/apachectl restart 重启apache测试。
4.测试网站。请在浏览器中输入域名,测试设置。
域名1:www.kechengliu.com默认是localhost,访问的是/alidata/www/phpwind下的文件
域名2:jiajiao2.kechengliu.com访问的是/alidata/www/jiajiao下的文件
注:转载请注明出处https://bbs.aliyun.com/read/237396.html
一个阿里云apache服务器配置两个或多个域名forLinux的更多相关文章
- 阿里云ECS服务器配置ubuntu安装openfire服务器
最近搞了一台阿里云的ECS服务器,因为搞活动半年免费,所以就申请了一台,过两天就批准下来,顺便多花了1百多RMB买了固定IP.总体说来还是挺值的,觉得一个人用挺浪费,分享出来跟大家一起玩玩. 搞台服务 ...
- 五:用JAVA写一个阿里云VPC Open API调用程序
用JAVA写一个阿里云VPC Open API调用程序 摘要:用JAVA拼出来Open API的URL 引言 VPC提供了丰富的API接口,让网络工程是可以通过API调用的方式管理网络资源.用程序和软 ...
- 从拥有一个阿里云账号开始使用Maxcompute
本教程并不会创建子账户来管理maxcompute,是直接使用主账号来对maxcompute进行管理(强烈不推荐在生产环境中这样做!!) Step1:创建阿里云账号并实名认证 创建一个阿里云账号(使 ...
- 阿里云LINUX服务器配置HTTPS(NGINX)
本文首发于:http://www.fengzheng.pub/archives/238.html 背景说明 服务器为阿里云 ECS,操作系统为 CentOS 6.5. 部署配置说明 第一步,安装ngi ...
- (mac)阿里云ECS服务器配置过程
-----首先本人是半只脚入门的iOS开发者,弄这个只是单纯想多学点东西. -----阿里云服务器的配置选择:既然是学习用的,最最基础的配置就行了.1M带宽,1核1G...这就不详述了.没啥可选的,( ...
- 从0开始搭建一个阿里云java部署环境
一.购买服务器 https://www.aliyun.com/daily-act/ecs/activity_selection?spm=5176.8112568.738194.8.674c9ed53Y ...
- 【NodeJs】记录一个阿里云redis的坑
背景 一个风和日丽的下午,一个上线的大好日子,以为一切准备好,上个线也就三五分钟的事.但是... 图样图森破. 背景是这样的,项目需要,在阿里云开通redis,在项目中配好redis的连接字符串后,以 ...
- Navicate 连接阿里云MySQL(两种方式及原理讲解)
Navicate 连接阿里云(两种方式及原理讲解) 一.直连方式(通过3306端口) 1.概述 2. 环境准备 3.操作及讲解 二.使用SSH通道 1.概述 2.环境准备 3.操作及讲解 如果对你有帮 ...
- 阿里云ECS服务器配置(Ubuntu+JAVA+Tomcat+Mysql)
最近购买了阿里云的ECS服务器,就服务器的安装配置做简要的说明,也方便日后查看. 1.远程操作服务器 远程操作服务器可以使用putty工具,下载地址:http://pan.baidu.com/s/1q ...
随机推荐
- 使用Vscode添加中文汉化插件
一.首先打开Vscode,找到该软件的扩展,如下: 二.点击扩展按钮之后,会出现如下的界面,有一个扩展搜索输入框,输入chinese之后,会随之产生一些匹配的插件 三.重启一下Vscode,然后就看到 ...
- SpringBoot路径映射
当然这个功能并非是springboot特有的,只是springboot提供了更简便的方法以供使用. 传统情况下我们跳转一个动态页面且并没有数据,也需要在controller中写一个跳转的con ...
- React native 之 Promise
关键词:Promise Promise.all Promise是什么?=> https://www.runoob.com/w3cnote/es6-promise.html Promise.all ...
- React使用的思考总结
1.事件处理中的this指针问题 在 react 中,用 class 声明一个组件,调用 class 中的方法时,如果该方法中有 this 且没有手动绑定 this 指针,则会发生 this 指向 u ...
- 在asp.net 中怎样上传文件夹
以ASP.NET Core WebAPI 作后端 API ,用 Vue 构建前端页面,用 Axios 从前端访问后端 API ,包括文件的上传和下载. 准备文件上传的API #region 文件上传 ...
- JSP上传整个文件夹
文件上传是最古老的互联网操作之一,20多年来几乎没有怎么变化,还是操作麻烦.缺乏交互.用户体验差. 一.前端代码 英国程序员Remy Sharp总结了这些新的接口 ,本文在他的基础之上,讨论在前端采用 ...
- Java——容器(泛型)
[泛型] 起因:JDK1.4之前类型不明确 <1>装入集合的类型都被当做Object对待,从而失去自己的实际类型. <2>从集合中取出时往往需要转型,效率低,且很容易出错 ...
- R which
setwd("E:/courses/molecular biology/homework1st") genes <- read.table('genes.txt',sep = ...
- 【CF1249D】Too Many Segments(贪心,set,vector)
题意:给定n条线段和覆盖上限k,每条线段都覆盖了区间内的整点 问最少删掉几条线段能使所有的整点都被覆盖不超过k次 k<=n<=2e5,l[i],r[i]<=2e5 思路:比赛时候不会 ...
- Packet Transactions: High-level Programming for Line-Rate Switches
Name of article:Packet Transactions: High-level Programming for Line-Rate Switches Origin of the art ...