没有什么能够阻挡,你对自由的向往。

Tag configure

nginx各种实用的配置(二)

十、$document_uri 表示访问的url
需求是:访问 www.abc.com 请求到 www.abc.com/abc/
在nginx配置文件中加入:

if ($document_uri !~ 'abc')
{
rewrite ^/(.*)$ /abc/$1 permanent;[......]

Read more

nginx各种实用的配置(一)

一、对目录和文件设置用户认证
首先需要安装apache,可以使用yum install httpd 安装
生成密码文件,创建用户
htpasswd -c /usr/local/nginx/conf/htpasswd test ## 添加test用户,第一次添加时需要加-c参数,第二次添加时不需[……]

Read more

Nginx的各种简单配置(二)

一、nginx.conf文件的基本配置

vim /usr/local/nginx/conf/nginx.conf

user nobody nobody;

## 定义运行Nginx服务的用户和用户组

worker_processes 2;

## nginx进程数,建议设置为等[......]

Read more

Nginx的各种简单配置(一)

记录一下Nginx下各种简单实用的配置方法
一、Nginx服务启动脚本
Nginx服务还没有启动脚本,每次都用/usr/local/nginx/conf/nginx来控制,略显麻烦找了一个shell脚本.
Code:

#!/bin/bash
# chkconfig: - 30 21[......]

Read more

Centos6.6 LNMP环境搭建(带一键安装shell脚本)

上次搭建了LAMP环境,这次来搭建LNMP环境,也就是 Linux+Nginx+Mysql+Php。

有了上次的经验,这一次并不是很难,建议第一次安装的朋友用我给的安装包安装。

具体看操作:

1、安装Mysql数据库(Php要依赖它,Nginx最后安装)

Command:[……]

Read more

© 2025 laowang's blog — Powered by WordPress

Theme by Anders NorenUp ↑