delete web server(nginx+apache)
#!/bin/bash
conf_dir1="/usr/local/nginx/conf/vhost.d"
conf_dir2="/usr/local/apache2/conf/vhost.d"
rewrite_dir="/usr/local/nginx/conf/rewrite.d"
web_dir="/data/www/vhosts"
function dis_info {
clear
echo
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "Del Virtual Host"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo
}
if [ $# -eq 0 ];then
dis_info;
echo "Pleast input domain:"
read -p "(Default or Example domain: www.example.com):" domain ;
fi
if [ $# -eq 1 ];then
domain=$1
fi
if [[ $domain == "" ]];then
domain="example.com"
else if [[ $domain =~ ^www\.(.*)$ ]];then
nonwww_domain=${domain#www.}
fi
fi
rm -rf $web_dir/$domain
rm -rf $conf_dir1/$domain.conf
rm -rf $conf_dir2/$domain.conf
rm -rf /data/www/logs/apache_log/access/${domain}_access.log*
rm -rf /data/www/logs/apache_log/error/${domain}_error.log*
rm -rf /data/www/logs/nginx_log/access/${domain}_access.log*
rm -rf /data/www/logs/nginx_log/error/${domain}_error.log*
rm -rf $rewrite_dir/$domain.conf
echo
echo "web site infomations:"
echo "========================================"
echo "domain list:$domain "
echo "----------------------------------------"
echo "website dir:$web_dir/$domain"
echo "----------------------------------------"
echo "nginx_conf file:$conf_dir1/$domain.conf"
echo "----------------------------------------"
echo "apache2_conf file:$conf_dir2/$domain.conf"
echo "----------------------------------------"
echo "Del web site is OK"
echo "========================================"
使用方法:
执行脚本,并传入要删除的网站域名作为参数
delete web server(nginx+apache)的更多相关文章
- add web server(nginx+apache)
#!/bin/bash # # Web Server Install Script # Last Updated 2012.09.24 # ##### modify by WanJie 2012.09 ...
- delete web server(nginx)
#!/bin/bash conf_dir1="/usr/local/nginx/conf/vhost.d" #conf_dir2="/usr/local/apache2/ ...
- NGINX Web Server Nginx web server
原文地址:http://nginx.com/resources/admin-guide/web-server/ NGINX Web Server Nginx web server This secti ...
- add web server(nginx)
#!/bin/bash # # Web Server Install Script # Last Updated 2012.09.24 # ##### modify by WanJie 2012.09 ...
- Build Web Server with Apache and Passenger
Follow the instructions at 2.6. Generic installation, upgrade and downgrade method: via tarball of P ...
- Nginx负载均衡:分布式/热备Web Server的搭建
Nginx是一款轻量级的Web server/反向代理server及电子邮件(IMAP/POP3)代理server.并在一个BSD-like 协议下发行.由俄罗斯的程序设计师Igor Sysoev所开 ...
- Install the high performance Nginx web server on Ubuntu
Look out Apache, there's a web server – Nginx (pronounced Engine X) – that means to dismantle you as ...
- Web Server 与 App Server
Web Server 常见的Web Server有Apache Server与Nginx. Apache Http Server是Apache软件基金会下的一个项目,是一款开源的HTTP服务器软件(它 ...
- Apache 后台服务器(主要处理php及一些功能请求 如:中文url) Nginx 前端服务器(利用它占用系统资源少得优势来处理静态页面大量请求) Lighttpd 图片服务器 总体来说,随着nginx功能得完善将使他成为今后web server得主流。
Apache 后台服务器(主要处理php及一些功能请求 如:中文url) Nginx 前端服务器(利用它占用系统资源少得优势来处理静态页面大量请求) Lighttpd 图片服务器 总体来说,随着ngi ...
随机推荐
- 数据标记系列——标记工具Imagtagger
https://github.com/bit-bots/imagetagger 待有空说一说!
- 数据交换格式与SpringIOC底层实现
1.数据交换格式 1.1 有哪些数据交换格式 客户端与服务器常用数据交换格式xml.json.html 1.2 数据交换格式应用场景 1.2.1 移动端(安卓.iOS)通讯方式采用http协议+JSO ...
- eclipse(STS)安装jd-eclipse插件实现查看API源代码功能
emmm,IDEA确实是比STS智能很多,不过适当的转化也是需要的,这里介绍一下eclipse(STS)实现查看class反编译的源文件的功能 去Java Decompiler官网下一下eclipse ...
- 洛谷 P1443 马的遍历
终于遇到一个简单纯粹一点的bfs了...... 题目链接:https://www.luogu.org/problemnew/show/P1443 题目是求到达一个点的最短步数 也就是说我只要bfs遍历 ...
- Python开发第一篇
Python 是什么? 首先他可能是比较好的一个编程开发语言!
- yyb博客的几道神仙题
该比赛链接 T5 题意: 给你一个\(n\times n\)的网格,开始有\(m\)个被涂成黑色的格子,如果存在三个格子\((x,y)\),\((y,z)\),\((z,x)\)满足\((x,y)\) ...
- shell 基础(二)变量
1. shell变量的定义 1)Shell 支持以下三种定义变量的方式: variable=value variable='value' variable="value" 特点 1 ...
- idea搭建springboot
1.创建新项目 2.继续项目配置 Name:项目名称Type:我们是Maven构建的,那么选择第一个Maven ProjectPackaging:打包类型,打包成Jar文件Java Version: ...
- 首次使用Oracle SQL Developer 提示: enter the full pathname for java.exe
https://www.cnblogs.com/520future/p/7699095.html 首次使用Oracle SQL Developer 提示: enter the full pathnam ...
- 金融量化分析【day112】:股票数据分析Tushare1
目录 1.使用tushare包获取某股票的历史行情数据 2.输出该股票所有收盘比开盘上涨3%以上的日期 3.输出该股票所有开盘比前日收盘跌幅超过2%的日期 4.假如我从2010年1月1日开始,每月第一 ...