[Mac OS] Safari 使用扩展插件“微软翻译”一键翻译网页 (二)
2015-06-08 16:50
471 查看
1.使用fedora源
2.安装nginx
3.测试配置文件
4.编辑配置文件
5.启动nginx
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm yum install nginx
nginx -t
vim /etc/nginx/nginx.conf
service nginx start
[root@mail nginx]# cat /etc/nginx/nginx.conf
iptables设置
iptables -I INPUT -p tcp -s 0/0 --dport 80 -j ACCEPT
iptables -I OUTPUT -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
2.安装nginx
3.测试配置文件
4.编辑配置文件
5.启动nginx
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm yum install nginx
nginx -t
vim /etc/nginx/nginx.conf
service nginx start
[root@mail nginx]# cat /etc/nginx/nginx.conf
user nginx; worker_processes 2; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; worker_rlimit_nofile 65535; events { worker_connections 65535; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; keepalive_timeout 65; upstream tomcat { server localhost:8081; } upstream apache { server localhost:8088; } server { listen 80 default; server_name _; location / { root /usr/share/nginx/html; index index.jsp index.html index.htm; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://tomcat; } } server{ listen 80; server_name angroid.com on-z.com; location / { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://apache; } } # Load config files from the /etc/nginx/conf.d directory include /etc/nginx/conf.d/*.conf; }
iptables设置
iptables -I INPUT -p tcp -s 0/0 --dport 80 -j ACCEPT
iptables -I OUTPUT -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
相关文章推荐
- TF-IDF余弦相似性找出相似文章
- vc++ 的指针和数组结合理解的最佳例子
- 【云快讯】之四十八《IBM和Cisco最新收购,加强Openstack易用能力》
- Ext 4.2以后版本 ComboBox 联动
- 路由器配置基础
- 阿里云Ubuntu部署java web(1) - 系统配置
- 有关Flex在地图上添加柱状图的个人经验总结
- MKMapKit
- Python中json simplejson 区别和使用
- Win10系统应用商店下载完软件提示无法安装应用
- “Ceph浅析”系列之一——Ceph概况
- mysql之字符集与校对集
- 机器学习--EM算法求解高斯混合模型
- 棋盘问题
- Hoeffding inequality and bound
- 【云快讯】之四十八《IBM和Cisco最新收购,加强Openstack易用能力》
- Android触摸屏事件派发机制详解与源码分析一(View篇)
- 鱼眼拼接之SIFT特征点检测之DOG差分空间
- 多进程和多线程的优缺点
- 机器学习--支持矢量机(3)