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

c 网站购物车怎么做seo sem什么意思

c 网站购物车怎么做,seo sem什么意思,最好的响应式网站有哪些,百度地图手机网页版文章目录 NginxNginx主要作用转发配置相关问题参考推荐阅读 Nginx Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔赛索耶夫为俄罗斯访问量第二的Rambler.ru站点(俄文:Рамбл…

文章目录

    • Nginx
    • Nginx主要作用
    • 转发配置
    • 相关问题
    • 参考
    • 推荐阅读

Nginx

Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点(俄文:Рамблер)开发的,公开版本1.19.6发布于2020年12月15日
其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、简单的配置文件和低系统资源的消耗而闻名。2022年01月25日,nginx 1.21.6发布。
Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,在BSD-like 协议下发行。其特点是占有内存少,并发能力强,事实上nginx的并发能力在同类型的网页服务器中表现较好。

Nginx主要作用

  1. CI/DI
  2. 转发
  3. 负载均衡

本文主要内容:转发

转发配置

  1. tcp端口监听是唯一的,nginx要在哪个端口监听,是不能被占用的。配置一个server节点,就等于在server节点启动了一个tcp监听。
  2. nginx同一个端口可以监听多个不同host的请求。配置文件中可以重复写同一个端口的server节点。

#user  nobody;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}stream {  server {listen  13389;  #本地请求端口proxy_pass x.x.x.x:3389;  #服务器远程桌面端口}server {listen  6672;  #本地请求端口proxy_pass  x.x.x.x:5672;  #rabbitmq}}http {include       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  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {listen       8888;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;#数采正式/测试接口  不走https了 不用配置跨域访问#location /RTP/DaqApi {#    #Proxy Settings#    add_header Access-Control-Allow-Origin $http_origin;#    add_header Access-Control-Allow-Headers *;#    add_header Access-Control-Allow-Methods *;#    proxy_redirect     off;#    proxy_http_version 1.1;#    proxy_set_header   Host             $host:$server_port;#    proxy_set_header   X-Real-IP        $remote_addr;#    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;#    proxy_set_header   X-Forwarded-Proto $scheme; #    proxy_set_header   Upgrade $http_upgrade;#    proxy_set_header   Connection  "upgrade"; #    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;#    proxy_max_temp_file_size 0;#    proxy_connect_timeout      90;#    proxy_send_timeout         90;#    proxy_read_timeout         90;          #    proxy_pass https://x.x.x.x:9433;#}location /RTPDaq/Api/{proxy_pass  http://x.x.x.x:9433/; proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html#error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {#    root           html;#    fastcgi_pass   127.0.0.1:9000;#    fastcgi_index  index.php;#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;#    include        fastcgi_params;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server##server {#    listen       443 ssl;#    server_name  localhost;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_cache    shared:SSL:1m;#    ssl_session_timeout  5m;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers  on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}

相关问题

在nginx中配置proxy_pass时,如果是按照^~匹配路径时,要注意proxy_pass后的url最后的/,当加上了/,相当于是绝对根路径,则nginx不会把location中匹配的路径部分代理走;如果没有/,则会把匹配的路径部分也给代理走。

location ^~ /static_js/ 
{ 
proxy_cache js_cache; 
proxy_set_header Host js.test.com; 
proxy_pass http://js.test.com/; 
}

如上面的配置,如果请求的url是http://servername/static_js/test.html
会被代理成http://js.test.com/test.html

而如果这么配置

location ^~ /static_js/ 
{ 
proxy_cache js_cache; 
proxy_set_header Host js.test.com; 
proxy_pass http://js.test.com; 
}

则会被代理到http://js.test.com/static_js/test.htm

当然,我们可以用如下的rewrite来实现/的功能

location ^~ /static_js/ 
{ 
proxy_cache js_cache; 
proxy_set_header Host js.test.com; 
rewrite /static_js/(.+)
/
1 break; 
proxy_pass http://js.test.com; 
} 

参考

Nginx配置proxy_pass转发的/路径问题

推荐阅读

Nginx常用配置及代理转发

http://www.mnyf.cn/news/37072.html

相关文章:

  • 哪个网站可以做创意短视频线上营销怎么做
  • win7下asp网站搭建手机优化器
  • 自己做报名网站市场营销方案
  • 网站运营托管网站推广的工作内容
  • 哪个博客可以做单页网站网络推广渠道
  • 用DW 做响应式网站泰安做网站公司哪家比较好
  • 优化网站多少钱电商平台哪个最好最可靠
  • 网站建设规划书范文5000字怎样建立一个网站
  • 备案网站多少钱南京做网站的公司
  • 电商网站建设实训(互联网营销大赛)做网站用哪个软件
  • 顺德公益网站制作备案查询站长之家
  • 手机网站幻灯片网站推广和seo
  • 佛山网红网站seo优化徐州百度网络
  • 樟树网站制作手机端网站优化
  • 宣传网站开发成人技术培训学校
  • lamp网站开发黄金组合 pdf网络营销的专业知识
  • 网络销售模式 自建网站百度校招
  • 沈阳网站排名优化系统优化的意义
  • 佛山网站搜索优化一键开发小程序
  • 邯郸新闻沈阳seo按天计费
  • wordpress亲子主题网络优化工程师需要学什么
  • 网站设计有限公司今日军事新闻头条视频
  • 建设一个网站报价b2b网站排名
  • 外包接单平台网站抖音关键词排名查询
  • 自己做网站可以用私有云吗电脑培训机构
  • 泉州网站排名优化关键词优化排名软件哪家好
  • 个人餐饮网站模板品牌运营公司
  • wordpress栏目列表页郑州seo优化外包公司
  • 网站后台显示连接已重置来宾seo
  • 泉州网站建设学徒招聘广州最新重大新闻