.

.

server
{
listen ;
#listen [::]: default_server ipv6only=on;
server_name www.blog.com;
index index.html index.htm index.php;
root /home/wwwroot/blog/public; #error_page /.html;
include enable-php.conf; location /nginx_status
{
stub_status on;
access_log off;
} location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} location ~ /\.
{
deny all;
} access_log /home/wwwlogs/access.www.blog.com.log access;
} server
{
listen ;
#listen [::]: default_server ipv6only=on;
server_name www.yiibasic.com;
index index.html index.htm index.php;
root /home/wwwroot/yiibasic/web; #error_page /.html;
include enable-php.conf; location /nginx_status
{
stub_status on;
access_log off;
} location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} location ~ /\.
{
deny all;
} access_log /home/wwwlogs/access.www.yiibasic.com.log access;
}

.

LNMP 基于域名的虚拟主机配置 (Centos5.6)的更多相关文章

  1. Nginx--服务部署、基于域名的虚拟主机配置

    一.服务部署 1.预处理 安装CentOS ,配置hosts.静态IP.设置必要的安全参数等(略) 1-1.系统环境 [root@vnx ~]# cat /etc/redhat-release Cen ...

  2. CentOS 7运维管理笔记(8)----Apache基于域名的虚拟主机配置

    使用基于域名的虚拟主机配置是比较流行的方式,可以在同一个IP上配置多个域名并且都通过80端口访问. (1) 在网卡 eth0的第五个接口上配置 192.168.1.215 这个地址: (2) 配置/e ...

  3. Nginx总结(四)基于域名的虚拟主机配置

    前面讲了如何安装配置Nginx,大家可以去这里看看nginx系列文章:https://www.cnblogs.com/zhangweizhong/category/1529997.html 今天要说的 ...

  4. nginx基于域名的虚拟主机配置(本地分布式项目域名配置及测试方法)

    最有用的虚拟主机配置方式. 一个域名只能绑定一个ip地址,一个ip地址可以被多个域名绑定. 可以修改host文件实现域名访问. 前提:即使我们在nginx中配置基于域名的虚拟主机,也需要域名解析,即n ...

  5. apache2 httpd 基于域名的虚拟主机配置 for centos6X 和debian-8

    全系统虚拟主机: for debian 系统的apache2 域名 虚拟主机

  6. CentOS 7----Apache基于域名的虚拟主机配置

    配置/etc/hosts文件,192.168.1.209 对应的域名如下: 192.168.1.209 www.name1.com 编辑每个域名的配置文件: <VirtualHost 192.1 ...

  7. CentOS 7运维管理笔记(6)----Apache 基于 IP 的虚拟主机配置

    Apache 配置虚拟主机支持3种方式:基于IP的虚拟主机配置,基于端口的虚拟主机配置,基于域名的虚拟主机配置.本篇随笔记录自己基于IP的虚拟主机配置. 如果同一台服务器有多个IP,可以使用基于IP的 ...

  8. Nginx配置多个基于域名的虚拟主机+实验环境搭建+测试

    标签:Linux 域名 Nginx 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://xpleaf.blog.51cto.com/9 ...

  9. nginx配置基于域名的虚拟主机

    其实基于域名和基于ip的虚拟主机配置是差不多的,在配置基于ip的虚拟主机上我们只需要修改几个地方就能变成基于域名的虚拟主机,一个是要修改域名,一个是host文件直接看代码 [root@localhos ...

随机推荐

  1. jQuery判断滚动条滚到页面底部脚本

    原文地址 http://www.111cn.net/wy/jquery/61741.htm

  2. 关于hasOwnProperty()方法的应用

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. NSFileHandle编写json数据格式

    代码如下: + (void)writeToFile:(NSDictionary *)params filePath:(NSString *)path { NSData *jsonData = [sel ...

  4. 关于android:screenOrientation="portrait" 横竖屏切换

    当在AndroidManifest.xml文件中定义了android:screenOrientation="portrait",就表示当我们切换横竖屏的时候,屏幕的内容始终以竖屏显 ...

  5. web前端学习之路

    test 随着自己对于web前端知识了解的越多,越来越发现自己真的好菜 一脸茫然阶段 两年前大学接触网页设计,那时对于网页设计一窍不通,只是看了一本自己大学编的一本入门教材,我甚至不知道那些网页设计的 ...

  6. 2014.9.23window对象

    一.window对象 Wondow.navigate(url); 跳转页面(与超链接的区别:可以加逻辑条件) Var a = Math.random(); 0-1之间随机数 Var a = parse ...

  7. Labview学习之程序Web发布

    Labview学习之程序Web发布 1. LabVIEW Web服务器     在LabVIEW开发环境中,自身带了一个已连接好的Web服务器.LabVIEW Web服务器除了与其他Web服务器一样能 ...

  8. 戏说Java多线程

    戏说Java多线程. package com.cmp.chengfu.app.jdk6.desktop; import java.awt.Desktop; import java.io.File; i ...

  9. Android 汉字转拼音之工具篇

    /* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Versi ...

  10. Ubuntu Server修改IP、DNS、hosts

    本文记录下Ubuntu Server 16.04修改IP.DNS.hosts的方法 -------- 1. Ubuntu Server 修改IP sudo vi /etc/network/interf ...