nginx的nginx.conf的配置文件修改
2017-03-30 13:23
501 查看
nginx的nginx.conf的配置文件修改 提示: 1. user www; //需要在当前服务器下创建www的一个用户。 2. 需要在 /usr/local/nginx/logs下面同时存在,以下文件 access.log error.log nginx.pid www.log //==============配置文件开始====================// user www; worker_processes 8; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; pid logs/nginx.pid; events { worker_connections 2048; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name 127.0.0.1; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location /{ root /WebRoot/cmy; index index.php; if (-f $request_filename) { expires max; break; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; } } location ~ ^(.+\.php|.+\.html)(.*)$ { root /WebRoot/cmy; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_pass 127.0.0.1:9000; include fastcgi.conf; if ($request !~* HEAD(.*)$){ # access_log logs/www.log new_log; } # auth_basic "please enter password"; # auth_basic_user_file /chinasofti/server/nginx/conf/vhosts/nginx_adminpasswd.pl; } #location ~ \.php$ { #root /WebRoot/cmy; #fastcgi_pass 127.0.0.1:9000; #index index.php,index.html; #try_files $uri $uri/ /index.php?s=$uri; #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # #include fastcgi_params; #include fastcgi.conf; #} } } //==============配置文件结束====================//
相关文章推荐
- mac os 下 nginx 修改配置文件nginx.conf并重启
- 01_Nginx安装,nginx下部署项目,nginx.conf配置文件修改,相关文件配置
- 01_Nginx安装,nginx下部署项目,nginx.conf配置文件修改,相关文件配置
- 【Thinkphp5 】部署nginx时nginx.conf配置文件修改
- Linux内核参数配置文件修改(/proc/sys与/etc/sysctl.conf变量对应关系)
- Nginx配置文件(nginx.conf)配置详解
- (总结)Nginx配置文件nginx.conf中文详解
- WampServer 在 httpd.conf 中配置多站点 (IP 配置法:不用每次修改 hosts 文件 + 域名配置法 )
- Nginx配置文件nginx.conf中文详解
- (总结)Nginx配置文件nginx.conf中文详解
- Nginx配置文件nginx.conf中文详解
- nginx配置文件nginx.conf详细说明
- Nginx配置文件nginx.conf中文详解(总结)
- Nginx配置文件nginx.conf中文详解
- nginx.conf配置文件中timeout超时时间设置
- nginx.conf配置文件详解:
- Nginx配置文件nginx.conf中文详解
- Nginx配置文件nginx.conf中文详解
- (总结)Nginx配置文件nginx.conf中文详解
- nginx:413 Request Entity Too Large 及 修改 PHP上传文件大小配置