centos linux 里面 nginx Status 详细说明Activeconnections handled http_stub_status_module
Activeconnections:对后端发起的活动连接数;
server accepts 2349542:nginx 总共处理了2323442个连接;
handled:成功创建了6460567次握手;
requests:总共处理了87457570请求。
Reading:ng[……]
Activeconnections:对后端发起的活动连接数;
server accepts 2349542:nginx 总共处理了2323442个连接;
handled:成功创建了6460567次握手;
requests:总共处理了87457570请求。
Reading:ng[……]
1.nginx官网下载:http://nginx.org/en/download.html
linux版本的话,直接点击对应版本下载:nginx-1.9.9 注意,选择Stable version稳定本下载,不要下载最新版本
2.下载nginx老版本,或者其他本
这个有的没有出现[……]
1.使用yum安装nginx:http://www.weiruoyu.cn/?p=1839
2.确定是否安装:http_stub_status_module
1 2 3 4 |
[14:19:17] [root@formal-environment-05 Qwert1]# /usr/local/nginx/sbin/nginx -V [14:19:17] nginx version: nginx/1.9.3 [14:19:17] built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) [14:19:17] configure arguments: --prefix=/usr/local/nginx --with-pcre=/opt/pcre-8.36 --with-zlib=/opt/zlib-1.2.8 |
通过查看,发现没有http_stub_status_module代[……]
1.日志的配置文件位置,首先nginx日志是默认开启的。
使用yum安装默认在这个位置
1 |
/usr/local/nginx/conf/nginx.conf |
1 2 3 4 5 6 7 8 9 |
[root@formal-environment-05 Qwert1]# vi /usr/local/nginx/conf/nginx.conf #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; …… #access_log logs/access.log main; |
虽然它的配置文件是注释的,但是开启的,默认的位置
2.日志的具[……]
这个没有加入到服务里面,是不能使用service直接来关闭的。 1.在不重启的情况下加载配置文件:
1 2 |
cd /usr/local/nginx/sbin ./nginx -s reload |
2.关闭
查询nginx主进程号
#ps -ef | grep nginx
[crayon-5c6832e14357[……]
1.搭建nginx,本博客里面有:http://www.weiruoyu.cn/?p=1839
2.安装了openssl和openssl-devel
1 2 |
#yum install openssl #yum install openssl-devel |
3.生成密钥(输入命令后输入相应密码和单位名称,简称等)
[crayon[……]
1.yum安装nginx即可
2.设置配置文件
清空/etc/nginx/nginx.conf配置文件,
然后复制代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; client_max_body_size 8m; fastcgi_buffer_size 128k; fastcgi_buffers 8 128k; send_timeout 300; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; keepalive_timeout 65; server_name_in_redirect off; server_names_hash_bucket_size 128; server { listen 80; server_name www.test.com; rewrite "^/(.*)$" http://news.ifeng.com/$1 break; location / { root /var/tmp/nginx; index index.html index.htm index.php; autoindex on; if (!-e $request_filename) { rewrite (.*) /?index.php/$1; } } location ~ \.php$ { root /Server/data/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } } |
这个里面最关键的一段是下面这一段代码
server {
listen 80;
se[……]
1.使用yum安装nginx,配置文件在/etc/nginx/nginx.conf地方
2.修改配置文件
彻底删除清空原配置文件/etc/nginx/nginx.conf,然后复制如下代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; client_max_body_size 8m; fastcgi_buffer_size 128k; fastcgi_buffers 8 128k; send_timeout 300; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; keepalive_timeout 65; server_name_in_redirect off; server_names_hash_bucket_size 128; server { listen 80; server_name localhost; location / { root /var/tmp/nginx; index index.html index.htm index.php; autoindex on; if (!-e $request_filename) { rewrite (.*) /?index.php/$1; } } location ~ \.php$ { root /Server/data/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } } |
其中/var/tmp/ngi[……]
======1.安装nginx========
安装教程:http://www.weiruoyu.cn/?p=1839
======2.安装jdk,tomcat========
jdk安装:
tomcat安装
直接下载安装包即可
在tomcat目录里面找到/web[……]
系统是 centos6.4
======1.添加设置yum源=======
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vi nginx.repo
添加如下内容
[ngin[……]