nobody; #对于用户有安然性限制的伙伴可以创建一个账户去应用 worker_processes 1; events { use epoll; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 60; #简单文本显示格局编辑 fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 8 128k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; fastcgi_temp_path /dev/shm; server{ listen 80; server_name localhost; access_log /var/log/nginx/aeecss.log; error_log /var/log/nginx/error.log; location / { proxy_pass http://li7105.com; proxy_redirect default; } } } 下面运行nginx,查看信息
- [root@N+T sbin]# /usr/bin/nginx -c /usr/local/nginx/conf/nginx.conf
- [root@N+T sbin]# ps -ef | grep nginx
- root 1561 1 0 13:04 ? 00:00:00 nginx: master process /usr/bin/nginx -c /usr/local/nginx/conf/nginx.conf
- www 1562 1561 0 13:04 ? 00:00:00 nginx: worker process
- root 1709 1573 0 18:49 pts/1 00:00:00 grep
留意:nginx没有启动起来,麻烦去卖力的检查一下nginx设备文件。
PS:开机警活启动的话,直接把启动代码丢进rc.local这个文件琅绫擎即可。
推荐阅读
人工智能算什么?美国谷歌正式宣布!
开辟者大年夜赛路演 | 12月16日,技巧立异,北京不见不散
一这是改变世界的一次握手!今天,世界上两大年夜最尖端的科学:人工智能与基因科学,终于成功会师!方才,谷歌向世界宣布:谷歌拿>>>详细阅读
本文标题:Linux下Nginx+多Tomcat负载均衡实现详解
地址:http://www.17bianji.com/lsqh/39760.html
1/2 1