delete web server(nginx)
#!/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)的更多相关文章
- delete web server(nginx+apache)
#!/bin/bash conf_dir1="/usr/local/nginx/conf/vhost.d" conf_dir2="/usr/local/apache2/c ...
- 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+apache)
#!/bin/bash # # Web Server Install Script # Last Updated 2012.09.24 # ##### modify by WanJie 2012.09 ...
- add web server(nginx)
#!/bin/bash # # Web Server Install Script # Last Updated 2012.09.24 # ##### modify by WanJie 2012.09 ...
- 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 ...
- virtualbox搭建ubuntu server nginx+mysql+tomcat web服务器1 (未完待续)
virtualbox搭建ubuntu server nginx+mysql+tomcat web服务器1 (未完待续) 第一次接触到 linux,不知道linux的确很强大,然后用virtualbox ...
- 在nginx中配置如何防止直接用ip访问服务器web server及server_name特性讲解
看了很多nginx的配置,好像都忽略了ip直接访问web的问题,不利于SEO优化,所以我们希望可以避免直接用IP访问网站,而是域名访问,具体怎么做呢,看下面. 官方文档中提供的方法: If you d ...
- Setting up Django and your web server with uWSGI and nginx
https://uwsgi.readthedocs.io/en/latest/tutorials/Django_and_nginx.html Setting up Django and your we ...
随机推荐
- Java-Servlet--《12-WEB应用中的普通Java程序如何读取资源文件.mp4》 有疑问
\第五天-servlet开发和ServletConfig与ServletContext对象\12-WEB应用中的普通Java程序如何读取资源文件.mp4; 多层时,DAO为了得到资源文件中的配置参数: ...
- DataGrid 查不出数据 注意事项
总结以下几条:1.SQL文在数据控中查询成功在写入,表内字段名尽量复制,手打太容易错了.写SQL写错了,没有智能提示.2.DataGrid数据源先绑定.3.检查parameter顺序,条件的顺序也要考 ...
- SSIS服务无法登录的解决方案
现象1:登录SSIS报权限认证失败. 授予对 Integration Services 服务的访问权限 运行 Dcomcnfg.exe. Dcomcnfg.exe 提供用于修改注册表中的某些设置的用户 ...
- Firefox is already running,实际后台查不到进程了
Firefox is already running, but is not responding. To open a new window, you must first close the ex ...
- dubbo源码分析8——服务暴露概述
从上文中可知,com.alibaba.dubbo.config.spring.ServiceBean类是负责解析<dubbo:service/>的配置的,下面是它的类图 从类图上可知它继承 ...
- 范围for语句
C++11 新标准引入了一种更简单的for语句,这种语句可以遍历容器或其他序列的所有元素.范围for语句(range for statement)的语法形式是: for (declaration : ...
- xshell访问内网虚拟机
1 关闭虚拟机防火墙 chkconfig iptables off 2 查看VMware Network Adapter VMnet8的ip地址 3 虚拟机nat中设置端口转发,抓发至虚拟机内Linu ...
- $Django 虚拟环境,2.0、1.0路由层区别,Httprequest对象,视图层(fbv,cbv),文件上传
1 虚拟环境:解决问题同一台机器上可以运行不同版本的django, 1 用pychanrm创建--->files-->newproject--->选择虚拟环境 2 setting ...
- 使用lld自动发现监控多实例redis
zabbix 可以通过常见的手段监控到各种服务,通过编写脚本来获取返回值并将获取到的值通过图形来展现出来,包括(系统.服务.业务)层面.可是有些时候在一些不固定的场合监控一些不固定的服务就比较麻烦.例 ...
- centos如何安装Python3
Linux下默认系统自带python2.6的版本,这个版本被系统很多程序所依赖,所以不建议删除,如果使用最新的Python3那么我们知道编译安装源码包和系统默认包之间是没有任何影响的,所以可以安装py ...