apache2添加模块和添加站点

linux下的apache2的目录和windows上的区别还是很大的,但是用起来却更方便了,详解请看另一篇文章http://www.cnblogs.com/wancy86/p/linux_apache2.html

这里补充两个命令:

添加模块:

model_name是mods-available 下的模块名

sudo a2enmod model_name
sudo a2enmod proxy

开启vhost:

vhost_conf 是sites-available下的vhost配置文件名,文件名中不带.#

sudo a2ensite vhost_conf
sudo a2ensite mysite

vhost配置文件模板:

NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName tuitu.cn
ServerAdmin wancy86@sina.com DocumentRoot /var/www/demo/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/demo/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory> </VirtualHost>

apache2添加模块和添加站点的更多相关文章

  1. Asp.Net Core子应用由于配置中重复添加模块会引起IIS错误500.19

    ASP.NET Core已经从IIS中解耦,可以作为自宿主程序运行,不再依赖IIS. 但我们还是需要强大的IIS作为前置服务器,IIS利用httpPlatformHandler模块来对后台的一些web ...

  2. Apache不重新编译,利用apxs工具给Apache添加模块,如cgi模块

    想实践下Apache是如何运行cgi程序的,却发现先前编译安装Apache的时候,没有安装Apache的cgi模块. 附:CentOS6.x编译安装LAMP(2):编译安装 Apache2.2.25 ...

  3. LINUX下为apache 和 PHP 添加模块

    LINUX下为apache 和 PHP 添加模块https://www.path8.net/tn/archives/4717/opt/lampp/bin/httpd -V/opt/lampp/bin/ ...

  4. nginx添加模块 (非覆盖安装)

    nginx添加模块(非覆盖安装) 原已经安装好的nginx,现在需要添加一个未被编译安装的模块: 查看原来编译时都带了哪些参数# /usr/local/nginx/sbin/nginx -V ngin ...

  5. Linux下Nginx的安装、升级及动态添加模块

    系统基于ubuntu server 14.04.4 amd64 安装 第一步 下载并解压Nginx压缩包 从Nginx官网下载Nginx,或者在Linux上执行wget http://nginx.or ...

  6. yii2 添加模块过程

    本文以Yii2基本应用程序模板为例,介绍下向该框架下加入新模块的过程: 1. 新建模块相关目录与文件 step 1: 新建目录结构   首先在根目录下新建modules目录,然后在该目录下面添加模块目 ...

  7. sharepoint 2013 文档库 资源管理器打开报错 在文件资源管理器中打开此位置时遇到问题,将此网站添加到受信任站点列表,然后重试。

    我们在使用sharepoint 2013的文档库或者资源库的时候,经常会需要用到使用“资源管理器”来管理文档,但是有时候,点击“使用资源管理器打开”,会提示如下错误: 在文件资源管理器中打开此位置时遇 ...

  8. Linux下,Nginx的安装、升级及动态添加模块

    系统基于ubuntu server 14.04.4 amd64 安装 第一步 下载并解压Nginx压缩包 从Nginx官网下载Nginx,或者在Linux上执行wget http://nginx.or ...

  9. OpenWRT添加模块 Makefile和Config.in

    添加模块编译 在网上找了一下,很多关于编译Openwrt系统的资料,不过这些事情芯片厂商提供的开发包都已经办得妥妥了,但是没有找到系统介绍的资料,添加一个包的介绍有不多,其中有两个很有参考价值: ht ...

随机推荐

  1. ContentProvider要点复习

    ContentProvider要点复习 ContentProvider作为四大组件之一,发挥着举足轻重的作用.与之相关联的另外两个类分别是ContentResolver和ContentObserver ...

  2. Make Notepad++ auto close HTML/XML tags after the slash(the Dreamweaver way)

    I've been looking for a Notepad++ plugin that can close HTML/XML tags after a slash just like the wa ...

  3. websocket---Html5

    使用websocket主要是处理,通过服务器向页面发送消息,进行页面操作的处理. 以前类似情况,由于程序立即相应,处理事件较短,所遇采用过ajax进行轮询, 但是由于本次,需要人工干预,所以采用web ...

  4. 20145301&20145321&20145335实验五

    20145301&20145321&20145335实验五 这次实验我的组员为:20145301赵嘉鑫.20145321曾子誉.20145335郝昊 实验内容详见:实验五

  5. centos7 zabbix3 install done

    centOS7安装zabbix3.0 一.前提: 现在zabbix出现了3.0版本,服务器端只支持centOS7,客户端和代理可以支持centOS6,实验环境是服务端安装centOS7,客户用cent ...

  6. Windows Server 2003搭建邮件服务器

    Windows Server 2003搭建邮件服务器 由于Windows Server 2003默认是没有安装我们搭建邮件服务器所需要的POP3和SMTP服务的,因此需要我们自己来安装.方法如下: 1 ...

  7. oracle 11g install linux

    #!/bin/bash#Purpose:Create and config oracle install.#Usage:Log on as the superuser('root') #1.creat ...

  8. 【腾讯Bugly干货分享】QQ电话适配iOS10 Callkit框架

    本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/58009392302e4725036142fc Dev Club 是一个交流移动 ...

  9. MySQL--使用xtrabackup进行备份还原

    使用rpm包安装xtrabackup ## 安装依赖包 yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl- ...

  10. LuaAlchemy API 介绍

    The AS3 Sugar provides a Lua-like way to access AS3 class and instance creation, property getter/set ...