ubuntu 10.10安装nginx+php的过程
2011-12-06 14:05
453 查看
ubuntu 10.10安装nginx+php的过程
装上系统也有一段时间了,也没有装,今天工作时打算用ubuntu开发了,所以就安装nginx,在公司电脑就一路顺风啊!安装教程地址在这里:http://www.cnblogs.com/breg
当然可以baidu,google其实大体上都差不多,
回家时把我的本本也装上吧!谁知道公司电脑的顺利在笔记本上就一波三折,最终在多费很多时间和脑力的情况下终于圆满解决!
其实具体还是很简单的,只是要注意几个配置的问题!
其主要配置有这些:
1.sudo gedit /etc/nginx/sites-available/default
server { listen 80; ## listen for ipv4 listen [::]:80 default ipv6only=on; ## listen for ipv6 server_name localhost; access_log /var/log/nginx/localhost.access.log; location / { root /var/www/nginx-default; index index.html index.htm index.php; } location /doc { root /usr/share; autoindex on; allow 127.0.0.1; deny all; } location /images { root /usr/share; autoindex on; } 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 /var/www/nginx-default; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { #proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name; #注意替换网站路径,不然要报input的错误 include fastcgi_params; #特别注意此处有空格,原始文件时没有空格的,我的nginx启动不了就是忘了改这里 } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { #deny all; #} }
2.sudo gedit /etc/php5/cgi/php.ini
;zend的安装 [Zend Optimizer] zend_optimizer.optimization_level=1 zend_extension="/etc/zend/ZendOptimizer.so" ;将引号路径换成自己的路径 ;将注释去掉cgi.fix_pathinfo=1;
相关文章推荐
- Ubuntu Server 10.10安装配置Nginx+php-fpm+mysql
- Ubuntu9.10下Nginx+PHP(Fastcgi) 安装过程
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- 在Ubuntu 10.10下安装配置Eclipse for PHP Developer
- ubuntu安装 laravel 过程中出现: mcrypt php extension required 的问题 | 以及composer相关问题 | Nginx安装
- 在Ubuntu 10.10下安装配置Eclipse for PHP Developer
- ubuntu16下安装Nginx+php+phpMyAdmin全纪录!
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- ubuntu下安装nginx+php 遇到的问题 并且与tomcat共存
- ubuntu16.04下安装Nginx+php-fpm
- Ubuntu 9.04 server安装nginx+php(fastcgi)
- ubuntu安装nginx+php
- 安装ubuntu10.10后,如何配置一个Apache+MySQL+PHP环境
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- Ubuntu 9.04 server安装nginx+php(fastcgi)
- Ubuntu 10.10 光盘安装时分区过程备忘录
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- Ubuntu/Debian上安装Nginx+php环境
- ubuntu 12.04 安装 nginx+php+mysql web服务器
- Ubuntu安装Nginx+PHP7.0.4+MySQL5.6