Linux 学习笔记_13_1_LAMP环境编译(上) --编译前准备
2014-02-25 20:00
821 查看
在lnmp环境下创建 demo.zhengyang.com。
在etc/nginx/ 目录下面创建vhosts文件夹 ,然后在vhosts文件夹里面创demo.zhengyang.com.conf配置文件。
在配置里面放入以下内容:
server {
listen 80;
server_name demo.zhengyang.com;
index index.html index.htm index.php;
root /usr/share/nginx/html/zhengyang;
location ~ \.php$ {
root /usr/share/nginx/html/zhengyang;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/zhengyang/$fastcgi_script_name;
include fastcgi_params;
}
}
3.我的localhost在 usr/share/nginx/html下,在html目录下面创建zhengyang 这个文件夹 在文件夹里面创建一个1.php文件
4.在etc/hosts文件下面添加如图所示
在etc/nginx/ 目录下面创建vhosts文件夹 ,然后在vhosts文件夹里面创demo.zhengyang.com.conf配置文件。
在配置里面放入以下内容:
server {
listen 80;
server_name demo.zhengyang.com;
index index.html index.htm index.php;
root /usr/share/nginx/html/zhengyang;
location ~ \.php$ {
root /usr/share/nginx/html/zhengyang;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/zhengyang/$fastcgi_script_name;
include fastcgi_params;
}
}
3.我的localhost在 usr/share/nginx/html下,在html目录下面创建zhengyang 这个文件夹 在文件夹里面创建一个1.php文件
4.在etc/hosts文件下面添加如图所示
相关文章推荐
- Linux 多线程编程
- linux定时器的使用----笛风读书笔记系列
- Linux守护进程工作原理和方式----笛风读书笔记系列
- ARM linux常用汇编语法
- 自学Linux---5(tar命令)
- 自学Linux---4(分割窗口)
- CMake使用入门
- 5. linaro ubuntu移植
- 4.编译设备树
- 3.编译内核
- 2. 编译u-boot
- Ubuntu 12.04以上 安装搜狗输入法
- Linux实现的IEEE 802.1Q VLAN
- Steps to Install Hadoop on CentOS/RHEL 6---reference
- linux grep命令
- 英语词典 English dictionary in linux
- Find linux下
- 用arm-linux-gcc交叉编译 openssl zlib curl
- linux中fork()函数
- How to build & install GLFW 3 and use it in a Linux project