江新宇
摘要: 0、准备工作1sudo apt-get update1、安装并开启Nginx1sudo apt-get intsall nginx2sudo /etc/init.d/nginx start3#此时访问localhost如出现"Welcome to Nginx!"页面则表明安装成功2、安装mysql(会提示设置数据库密码)1sudo apt-get install mysql-server mysql-client3、安装phpmyadmin并在虚拟主机根目录下建立软链接1sudo apt-get install phpmyadmin2sudo ln -s /usr/shar 阅读全文
posted @ 2011-08-19 17:57 新风宇宙-江新宇的博客 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 最近有个想法,就是想实现nginx和apache并存,*.html或静态文件用nginx运行.php文件用apache运行怎么实现配置呢?首先nginx的配置修改/etc/nginx/sites-available/default文件,使用一下的方式来代理php运行,注意不要启用nginx的php运行方式# proxy the PHP scripts to Apache listening on 127.0.0.1:80 # location ~\.php$ {proxy_passhttp://localhost:8080;(这里改为apache的监听的IP和端口,老李是本地测试,所以这样) 阅读全文
posted @ 2011-08-19 17:46 新风宇宙-江新宇的博客 阅读(3977) 评论(1) 推荐(0) 编辑