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

自建商城网站做网站开发用什么软件

自建商城网站,做网站开发用什么软件,做soho的网站,html入门#xfeff;#xfeff;1、安装nginx安装教程#xff0c;参照#xff1a;http://mp.weixin.qq.com/s/RVaRlRpHqZRjCaXGmOlfKw 2、反向代理的配置修改部署目录下conf子目录的nginx.conf文件的内容[html]view plaincopylocation / { #设置主机头和客户端真实地…1、安装nginx安装教程参照http://mp.weixin.qq.com/s/RVaRlRpHqZRjCaXGmOlfKw 2、反向代理的配置修改部署目录下conf子目录的nginx.conf文件的内容[html]view plaincopylocation / {                #设置主机头和客户端真实地址以便服务器获取客户端真实IP                proxy_set_header Host $host;                # nginx非80端口处理                 #proxy_set_header Host $host:$server_port;                 # 获取真实IP                 proxy_set_header X-Real-IP $remote_addr;                #获取代理者的真实ip                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                    #禁用缓存                proxy_buffering off;                #设置反向代理的地址                proxy_pass http://192.168.1.1;(根据实际情况修改)          }    3、负载均衡的配置nginx 的 upstream默认是以轮询的方式实现负载均衡这种方式中每个请求按时间顺序逐一分配到不同的后端服务器如果后端服务器down掉能自动剔除。另外一种方式是ip_hash每个请求按访问ip的hash结果分配这样每个访客固定访问一个后端服务器可以解决session的问题。 [html]view plaincopy#user nobody;  worker_processes 2;     #error_log logs/error.log;  #error_log logs/error.log notice;  #error_log logs/error.log info;     #pid    logs/nginx.pid;        events {    accept_mutex on; #设置网路连接序列化防止惊群现象发生默认为on    multi_accept on; #设置一个进程是否同时接受多个网络连接默认为off    worker_connections 1024;#最大连接数  }        http {    include    mime.types;#文件扩展名与文件类型映射表此映射表主要用于部署在本nginx上的静态资源    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;       #反向代理       #【配置1】此配置是[配置4]和[配置5]的结合    #此配置将请求转发到两个WEB服务器根据客户端IP分配目标主机同时按权重分配流量    upstream app1 {      ip_hash;      server 192.168.14.132:8080 weight5;      server 192.168.14.133:80 weight3;    }       #【配置2】    #默认负载平衡配置,nginx应用HTTP负载平衡来分发请求。    #upstream app1 {    #  server 192.168.14.132:8080;    #  server 192.168.14.133:80;    #}       #【配置3】    #最小连接负载平衡配置,nginx将尽量不使用繁忙的服务器而是将新请求分发给不太忙的服务器。    #upstream app1 {    #  least_conn;    #  server 192.168.14.132:8080;    #  server 192.168.14.133:80;    #}       #【配置4】    #会话持久性配置使用ip-hash客户端的IP地址用作散列密钥    #以确定应为客户端请求选择服务器组中的哪个服务器。    #此方法确保来自同一客户端的请求将始终定向到同一服务器除非此服务器不可用。    #upstream app1 {    #  ip_hash;    #  server 192.168.14.132:8080;    #  server 192.168.14.133:80;    #}       #【配置5】    #加权负载平衡配置通过使用服务器权重进一步影响nginx负载平衡算法。    #未配置权重的服务器意味着所有指定的服务器被视为对特定负载平衡方法同等资格。    #upstream app1 {    #  ip_hash;    #  server 192.168.14.132:8080 weight3;    #  server 192.168.14.133:80 weight2;    #  server 192.168.14.134:80;    #  server 192.168.14.135:80;    #}          server {#可配置多个server以监听不同IP和不同端口      listen    80;#监听的端口      server_name localhost;#监听的服务器         #charset koi8-r;         #access_log logs/host.access.log main;         #反斜杆代表所有连接此配置目的是将所有连接交给名为app1的upstream代理实现负载平衡      location / {          #设置主机头和客户端真实地址以便服务器获取客户端真实IP          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_buffering off;           #反向代理的配置地址按实际情况配置         proxy_pass http://app1;      }         #图片文件路径一般来说静态文件会部署在本机以加快响应速度      #可配置多个这样的location满足各种需求      location ~\.(gif|jpg|png)$ {        root /home/root/images;      }         location ~\.(iso|zip|txt|doc|docx)$ {        root /home/root/files;      }            #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;      }            # FastCGI是CGI全称是“公共网关接口”(Common Gateway Interface)      #对于我来说使用Tomcat代替即可请忽略此配置。      #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;      #}         # 添加黑名单禁止某某访问特定文件      # concurs with nginxs 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;    #  }    #}     }  4、配置完后记得执行以下命令生效配置[html]view plaincopynginx -s reload  5、Nginx内置变量含义[html]view plaincopy名称    版本    说明变量列表来源于文件 ngx_http_variables    $args    1.0.8    请求中的参数;   $binary_remote_addr    1.0.8    远程地址的二进制表示   $body_bytes_sent    1.0.8    已发送的消息体字节数   $content_length    1.0.8    HTTP请求信息里的Content-Length;   $content_type    1.0.8    请求信息里的Content-Type;   $document_root    1.0.8    针对当前请求的根路径设置值;   $document_uri    1.0.8    与$uri相同;   $host    1.0.8    请求信息中的Host如果请求中没有Host行则等于设置的服务器名;   $hostname    1.0.8       $http_cookie    1.0.8    cookie 信息   $http_post    1.0.8       $http_referer    1.0.8    引用地址   $http_user_agent    1.0.8    客户端代理信息   $http_via    1.0.8     最后一个访问服务器的Ip地址。   $http_x_forwarded_for    1.0.8     相当于网络访问路径。   $is_args    1.0.8       $limit_rate    1.0.8    对连接速率的限制;   $nginx_version    1.0.8       $pid    1.0.8       $query_string    1.0.8    与$args相同;   $realpath_root    1.0.8       $remote_addr    1.0.8    客户端地址;   $remote_port    1.0.8    客户端端口号;   $remote_user    1.0.8    客户端用户名认证用;   $request    1.0.8    用户请求   $request_body    1.0.8       $request_body_file    1.0.8    发往后端的本地文件名称   $request_completion    1.0.8       $request_filename    1.0.8    当前请求的文件路径名   $request_method    1.0.8    请求的方法比如GET、POST等;   $request_uri    1.0.8    请求的URI带参数;   ...
http://www.zqtcl.cn/news/180231/

相关文章:

  • 门户网站有哪些局限性wordpress 登录信息
  • 某网站项目策划书怎么做一个简单的网站
  • 建设网站 翻译黑色网站配色
  • 企网官方网站建筑工程网上备案流程
  • 南京建设网站公司深圳国际红树林中心
  • 网站备案去哪小制作小发明手工小学生
  • 三木做网站学校网站的常规化建设
  • 短网址转换器seo网络运营
  • 汇邦团建网站谁做的郑州中心城区
  • 苏州瑞熙网站建设网站建设技术团队
  • 响应式 网站 开发百度投诉中心电话24个小时
  • 河南建设网站公司简介苏州建设网站价格
  • pc网站 手机网站电商小程序免费开店
  • 零基础学pytho 网站开发餐饮公司最好的网站建设
  • 品牌网站建设 蝌蚪5小微信分销怎么做
  • 二级域名建站虚拟主机与云服务器的区别
  • 如何安装网站模板文件网站维护具体做啥
  • 怎么建设官方网站登封网络推广公司
  • 苏州画廊网站建设vs2015 建设微网站
  • 海南网站建设及维护自己创建网站403
  • 网站推广的意义怎样把建好的网站上传到互联网
  • 王店镇建设中学网站seo搜索排名优化是什么意思
  • 北京哪家网站建设公司比较好js页面下载wordpress
  • 网站开发组岗位建设银行官网网站人事
  • 找公司做网站运营怎么样百度推广代运营
  • flask做克隆网站网站放到云服务器上怎么做
  • 有网站怎样做推广精品网站源码资源程序下载
  • 怎么建设淘宝联盟的网站梧州网站设计公司
  • 注册查询官方网站网站建设pad版本是什么
  • 做网站先得注册域名吗网站cdn+自己做