当前位置: 首页 > news >正文

网站怎么做高权重做软件需要网站有哪些

网站怎么做高权重,做软件需要网站有哪些,装修设计师网站,大兴区制作网站的公司1.前提 虚拟机能连接外网 仿真http应用需在本虚拟机启用(原因#xff1a;只有一台虚拟机做测试) http_8080和http_8081要启用#xff08;http测试应用#xff09; [rootcent79-2 ~]# ls -l http_* -rwxr-xr-x 1 root root 6391676 Jul 19 13:39 http_8080 -rwxr-xr-x 1 …1.前提 虚拟机能连接外网 仿真http应用需在本虚拟机启用(原因只有一台虚拟机做测试) http_8080和http_8081要启用http测试应用 [rootcent79-2 ~]# ls -l http_* -rwxr-xr-x 1 root root 6391676 Jul 19 13:39 http_8080 -rwxr-xr-x 1 root root 6391676 Jul 19 13:39 http_8081 [rootcent79-2 ~]# ./http_8080 [1] 1490 [rootcent79-2 ~]# ./http_8081 [2] 1496 [rootcent79-2 ~]# netstat -antulp |grep 8080 tcp6 0 0 :::8080 :::* LISTEN 1490/./http_8080 [rootcent79-2 ~]# netstat -antulp |grep 8081 tcp6 0 0 :::8081 :::* LISTEN 1496/./http_8081 [rootcent79-2 ~]# curl 192.168.10.156:8080 {text:I am one!} [rootcent79-2 ~]# curl 192.168.10.156:8081 {text:I am two!} [rootcent79-2 ~]# 2.Ngnix配置反向代理 2.1.Nginx配置单个反向代理 1.编辑nginx配置文件nginx.conf添加反向代理配置 user  nginx  nginx; worker_processes  2; worker_rlimit_nofile 1024; error_log  /var/log/nginx/error.log notice; pid        /var/run/nginx.pid; events {     use epoll;     worker_connections  1024;     multi_accept  on; } 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;     tcp_nopush     on;     autoindex    on;     keepalive_timeout  65;     #gzip  on;     include /etc/nginx/conf.d/*.conf;     server {     listen  80;     server_name 192.168.10.156;     location / {       proxy_pass http://www.baidu.com;     }     } } 2.nginx语法验证 命令 nginx -t [rootcent79-2 ~]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [rootcent79-2 ~]# 3.重启nginx 命令 systemctl restart nginx systemctl status nginx [rootcent79-2 ~]# systemctl restart nginx [rootcent79-2 ~]# systemctl status nginx ● nginx.service - nginx - high performance web server    Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)    Active: active (running) since Thu 2023-07-20 20:16:16 CST; 3s ago      Docs: http://nginx.org/en/docs/   Process: 2504 ExecStop/bin/sh -c /bin/kill -s TERM $(/bin/cat /var/run/nginx.pid) (codeexited, status0/SUCCESS)   Process: 2509 ExecStart/usr/sbin/nginx -c /etc/nginx/nginx.conf (codeexited, status0/SUCCESS)  Main PID: 2510 (nginx)    CGroup: /system.slice/nginx.service            ├─2510 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf            ├─2511 nginx: worker process            └─2512 nginx: worker process Jul 20 20:16:15 cent79-2 systemd[1]: Starting nginx - high performance web server... Jul 20 20:16:16 cent79-2 systemd[1]: Started nginx - high performance web server. [rootcent79-2 ~]# 4.反向代理验证 地址 http://192.168.10.156 转向为 2.2.Nginx配置反向代理集群 1.编辑nginx配置文件nginx.conf添加反向代理配置 user  nginx  nginx; worker_processes  2; worker_rlimit_nofile 1024; error_log  /var/log/nginx/error.log notice; pid        /var/run/nginx.pid; events {     use epoll;     worker_connections  1024;     multi_accept  on; } 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;     tcp_nopush     on;     autoindex    on;     keepalive_timeout  65;     #gzip  on;     include /etc/nginx/conf.d/*.conf;        upstream www.ztj.com {       server 192.168.10.156:8080 weight1 max_fails2 fail_timeout15s;       server 192.168.10.156:8081 weight1 max_fails2 fail_timeout15s;     }     server {     listen  80;     server_name 192.168.10.156;     location / {      proxy_pass http://www.ztj.com;     }     } } 2.nginx语法验证 命令 nginx -t [rootcent79-2 ~]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [rootcent79-2 ~]# 3.重启nginx 命令 systemctl restart nginx systemctl status nginx [rootcent79-2 ~]# systemctl restart nginx [rootcent79-2 ~]# systemctl status nginx ● nginx.service - nginx - high performance web server    Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)    Active: active (running) since Thu 2023-07-20 20:32:50 CST; 4s ago      Docs: http://nginx.org/en/docs/   Process: 2673 ExecStop/bin/sh -c /bin/kill -s TERM $(/bin/cat /var/run/nginx.pid) (codeexited, status0/SUCCESS)   Process: 2678 ExecStart/usr/sbin/nginx -c /etc/nginx/nginx.conf (codeexited, status0/SUCCESS)  Main PID: 2679 (nginx)    CGroup: /system.slice/nginx.service            ├─2679 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf            ├─2680 nginx: worker process            └─2681 nginx: worker process Jul 20 20:32:50 cent79-2 systemd[1]: Stopped nginx - high performance web server. Jul 20 20:32:50 cent79-2 systemd[1]: Starting nginx - high performance web server... Jul 20 20:32:50 cent79-2 systemd[1]: Started nginx - high performance web server. [rootcent79-2 ~]# 4.反向代理集群验证 命令curl 192.168.10.156 [rootcent79-2 ~]# curl 192.168.10.156 {text:I am one!} [rootcent79-2 ~]# curl 192.168.10.156 {text:I am two!} [rootcent79-2 ~]# 2.3.Nginx配置基于context的反向代理(重点) 1.编辑nginx配置文件nginx.conf添加反向代理配置 user  nginx  nginx; worker_processes  2; worker_rlimit_nofile 1024; error_log  /var/log/nginx/error.log notice; pid        /var/run/nginx.pid; events {     use epoll;     worker_connections  1024;     multi_accept  on; } 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;     tcp_nopush     on;     autoindex    on;     keepalive_timeout  65;     #gzip  on;     include /etc/nginx/conf.d/*.conf;        server {     listen  80;     server_name 192.168.10.156;     location / {      proxy_pass http://www.baidu.com;     }         location /root {       proxy_pass http://127.0.0.1:8080;         location /root/api {          proxy_pass http://127.0.0.1:8081;         }       }     } } 2.nginx语法验证 命令 nginx -t [rootcent79-2 ~]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [rootcent79-2 ~]# 3.重启nginx 命令 systemctl restart nginx systemctl status nginx [rootcent79-2 ~]# systemctl restart nginx [rootcent79-2 ~]# systemctl status nginx ● nginx.service - nginx - high performance web server    Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)    Active: active (running) since Thu 2023-07-20 20:39:33 CST; 2s ago      Docs: http://nginx.org/en/docs/   Process: 2713 ExecStop/bin/sh -c /bin/kill -s TERM $(/bin/cat /var/run/nginx.pid) (codeexited, status0/SUCCESS)   Process: 2718 ExecStart/usr/sbin/nginx -c /etc/nginx/nginx.conf (codeexited, status0/SUCCESS)  Main PID: 2719 (nginx)    CGroup: /system.slice/nginx.service            ├─2719 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf            ├─2720 nginx: worker process            └─2721 nginx: worker process Jul 20 20:39:33 cent79-2 systemd[1]: Starting nginx - high performance web server... Jul 20 20:39:33 cent79-2 systemd[1]: Started nginx - high performance web server. [rootcent79-2 ~]# 4.反向代理context验证 http://192..168.10.156 http://192..168.10.156/root http://192..168.10.156/root/api
http://www.w-s-a.com/news/576764/

相关文章:

  • cdr可不可做网站对网站建设起到计划和指导的作用
  • 合肥最好的网站建设网页设计心得体会2000字
  • 西安网站品牌建设门户网站类型
  • 网上做调查问卷的网站请人做网站域名和主机
  • 个人网站模板html5找公司网站建设
  • 找最新游戏做视频网站一个做网站的团队需要哪些人员
  • 威海市做网站的做网站很难吗
  • 广州房地产网站建设方案怎么免费申请网站
  • 免费生成网站软件下载影视公司名字取名
  • 网站公司提供程序免费的网页入口
  • jsp网站开发实例教学房产网站怎么做400电话
  • 网络营销方式及流程广州seo工作
  • 专业商城网站制作免费网页设计成品
  • 韩国优秀设计网站找做网站找那个平台做
  • 贵州省清镇市建设学校网站国家企业信用信息公示系统官网河北
  • 游戏界面设计网站网站建设问一问公司
  • 织梦网站模板如何安装教程视频国外哪些网站可以注册域名
  • 用群晖做网站网站中文名称注册
  • 做一个企业网站需要哪些技术app开发公司名字
  • 网站建设有技术的公司图片在线设计平台
  • 建公司网站的详细步骤关于进一步加强网站建设
  • 丰宁县有做网站的吗?维护一个网站一年多少钱
  • 杭州网站设计渠道wordpress购物主题
  • 山东政务网站建设文字logo免费设计在线生成
  • 韩雪个人网站唐山网络运营推广
  • 查建设工程业绩在哪个网站网站建设优化服务如何
  • 江苏省建设工程安全监督网站商洛网站制作
  • 海淀网站建设wzjs51网页设计页面配色分析
  • 网站的备案流程图垦利网站制作
  • 行业用品网站怎么建设外链买东西的网站都有哪些