“Openresty基础”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
(创建页面,内容为“=install= <pre> sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo sudo yum install -y openresty </…”)
 
第7行: 第7行:
  
  
==
+
=config=
 +
<pre>
 +
 
 +
ln -s /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
 +
nginx  -t
 +
nginx  -s reload
 +
 
 +
vi  /usr/local/openresty/nginx/conf/nginx.conf 
 +
 
 +
#add
 +
  # hailuo  2020
 +
  server {
 +
    listen 80;
 +
  #  listen 443 ssl;
 +
    server_name  prehailuo.com;
 +
 
 +
 
 +
#      ssl_certificate      /etc/nginx/ssl/hailuo.crt ;
 +
#      ssl_certificate_key  /etc/nginx/ssl/hailuo.key;
 +
#      ssl_session_cache    shared:SSL:1m;
 +
#      ssl_session_timeout  5m;
 +
#      ssl_ciphers  HIGH:!aNULL:!MD5;
 +
#      ssl_prefer_server_ciphers  on;
 +
 
 +
    client_max_body_size 100m;
 +
  client_body_timeout 300;
 +
    keepalive_timeout  300;
 +
    client_header_timeout 300;
 +
 
 +
proxy_ignore_client_abort on;
 +
 
 +
#    access_log      /var/log/nginx/nexy.bcom.log main;
 +
    error_log      /var/log/nginx/nexy.bcom.error.log;
 +
 
 +
 
 +
 
 +
 
 +
    location / {
 +
          root /data/www/prod-fe-staging--hailuo-admin-web;
 +
          try_files $uri $uri/ /index.html;
 +
#        proxy_set_header X-Real-IP $remote_addr;
 +
#        #        proxy_set_header Host $host;
 +
#        #        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 +
#        #        proxy_pass http://nexy.hailuo.pro_servers;
 +
#
 +
}
 +
 
 +
  }
 +
#hailuo the end
 +
</pre>

2020年3月5日 (四) 05:50的版本

install

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
sudo yum install -y openresty


config


ln -s /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
 nginx  -t 
nginx  -s reload

vi  /usr/local/openresty/nginx/conf/nginx.conf  

#add
   # hailuo  2020
   server {
    listen 80;
  #  listen 443 ssl;
    server_name  prehailuo.com;


 #      ssl_certificate      /etc/nginx/ssl/hailuo.crt ;
 #      ssl_certificate_key  /etc/nginx/ssl/hailuo.key;
 #      ssl_session_cache    shared:SSL:1m;
 #      ssl_session_timeout  5m;
 #      ssl_ciphers  HIGH:!aNULL:!MD5;
 #      ssl_prefer_server_ciphers  on;

    client_max_body_size 100m;
   client_body_timeout 300;
    keepalive_timeout  300;
    client_header_timeout 300;

 proxy_ignore_client_abort on;

#    access_log      /var/log/nginx/nexy.bcom.log main;
    error_log       /var/log/nginx/nexy.bcom.error.log;




    location / {
          root /data/www/prod-fe-staging--hailuo-admin-web;
          try_files $uri $uri/ /index.html;
#        proxy_set_header X-Real-IP $remote_addr;
#        #        proxy_set_header Host $host;
#        #        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#        #        proxy_pass http://nexy.hailuo.pro_servers;
#
 }

   } 
#hailuo the end