在windows下配置wnmp
1、下载mysql
2、下载php
3、下载nginx
4、创建文件夹wnmp
把php,nginx,mysql放到wnmp目录下,另外新建www目录,
用于存放web文件
配置nginx,如下(nginx.conf文件)
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name 域名;
#charset koi8-r;
access_log logs/host.access.log main;
root 根目录;
location / {
index index.php index.html;
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
location = /favicon.ico {
log_not_found off;
access_log off;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9090;
fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
5、打开php.ini,设置
cgi.fix_pathinfo=1
最后,开启fast-cgi
fast-cgi.exe -b 127.0.0.1:9090 -c php.ini
开启nginx
start nginx
在windows下配置wnmp的更多相关文章
- windows下配置wnmp
最近尝试windows下配置nginx+php+mysql,在这里总结一下. 1.下载windows版本的nginx,官网下载地址:http://nginx.org/en/download.htm, ...
- windows 下配置 Nginx 常见问题(转)
windows 下配置 Nginx 常见问题 因为最近的项目需要用到负载均衡,不用考虑,当然用大名鼎鼎的Nginx啦.至于Nginx的介绍,这里就不多说了,直接进入主题如何在Windows下配置. 我 ...
- Windows下配置使用 MemCached
Windows下配置使用MemCached 工具: memcached-1.2.6-win32-bin.zip MemCached服务端程序(for win) Memcached Manage ...
- windows下配置lamp环境(5)---配置MySQL5.6
开始配置mysql 1.创建配置文件my.ini 1.进入C:\wamp\MySQL 2.把my-default.ini 另存一份:my.ini 3.开始编辑mysql的配置文件,打开my ...
- windows下配置lamp环境(3)---配置PHP5.4
下面配置php Php文件夹里有两个php.ini-*文件,随便修改一个,去掉后缀,变成php.ini (如图) 打开php.ini ,添加php扩展目录723行左右(其实放哪都无所谓,只不过php. ...
- windows下配置lamp环境(0)---软件获取
工作快一年了,还没有怎么配置过服务器环境,经常使用集成套件wampserver,为了复习配置wamp服务器 特意在虚拟机中测试安装步骤如下. 安装前步骤:下载软件.软件下载地址如下: 1.apache ...
- windows下配置lamp环境(2)---配置Apache服务器2.2.25
配置Apache 配置Apache时,先要找到安装目录中的主配置文httpd.conf,使用文本编辑器打开,最好不要使用windows自带的编辑器,可以使用NotePad++, vim,或者subli ...
- windows下配置svn的https访问
svn是一个功能强大的代码版本管理系统,可以将服务端安装在linux.unix以及windows下.svn通常采用http方式进行代码提交与下载.由于密码采用明文传输,因此存在泄密的风险.若采用htt ...
- windows下配置lamp环境(1)---安装Apache服务器2.2.25
window下lamp成为wamp; 安装wamp环境的第一步是安装Apache服务器.下面开始安装步骤图文并茂. 一.双击安装包点“next”进行下一步,然后同意协议(这张图没有截):
随机推荐
- jenkins安装配置-白痴教程
1. Maven安装 下载maven安装包,放置在usr/maven目录下:apache-maven-3.2.5-bin.tar.gz tar zxvf apache-maven-3.2.5-bin. ...
- Effective Scala
Effective Scala Marius Eriksen, Twitter Inc.marius@twitter.com (@marius)[translated by hongjiang(@ho ...
- oracle基础学习
一.创建数据库用户 create user myaccount identified by mypassword;(my+account表示 账号,my+password表示 密码) 二.授予用户权限 ...
- LeetCode 3 Longest Substring Without Repeating Characters 区间,想法 难度:1
https://leetcode.com/problems/longest-substring-without-repeating-characters/ 思路:从某点结束所能取到的最早开头是到目前出 ...
- App Store最新审核标准,中文版
App store最新审核标准(2015.3)公布 1. 条款和条件 1.1 为App Store开发程序,开发者必须遵守 Program License Agreement (PLA).人机交互指南 ...
- 【Python①】python简介,安装以及配置
今天开始学习python,将一些心得和知识点记录下来,如有疏漏或表达问题,欢迎指正.后面所有代码均为Python 3.3.2版本(运行环境:Windows7)编写. 附:2014年8月TIOBE编程语 ...
- MySql中添加用户,新建数据库,用户授权,删除用户,修改密码
1.新建用户 登录MYSQL: @>mysql -u root -p @>密码 创建用户: mysql> insert into mysql.user(Host,User,Passw ...
- UVA 11297 线段树套线段树(二维线段树)
题目大意: 就是在二维的空间内进行单个的修改,或者进行整块矩形区域的最大最小值查询 二维线段树树,要注意的是第一维上不是叶子形成的第二维线段树和叶子形成的第二维线段树要 不同的处理方式,非叶子形成的 ...
- JAVA 如何把request请求的参数,快速放到model对象中
因为项目需要,需要从request中读取大量的参数. 因为本人过懒,所以写了个方法把request参数,直接放到对应的类中. 参数 String str="aa,bb,cc"; P ...
- MFC-01-Chapter01:Hello,MFC---1.3 第一个MFC程序(01)
#include <afxwin.h> class CMyApp : public CWinApp { public: virtual BOOL InitInstance(); }; cl ...