linux.conf

user  root;
worker_processes ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} 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 ;
keepalive_timeout ; #gzip on; server {
listen ;
server_name 0.0.0.0; #charset utf-; #charset koi-utf; autoindex on; autoindex_exact_size off; autoindex_localtime on; #access_log logs/host.access.log main; location / {
root ../path//web/dist/web;
error_page /;
} location /fang {
root /home/fang-site/www;
error_page /fang/;
} location /mirrors {
root /home/fang-site/www;
} location /j-lunker {
root /home/fang-site/j-lunker/www/; # redirection config for ngx-perfect-scrollbar
rewrite ngx-perfect-scrollbar/dist/ngx-perfect-scrollbar\.js /j-lunker/node_modules/ngx-perfect-scrollbar/dist/index.js;
rewrite ngx-perfect-scrollbar/dist/index$ /j-lunker/node_modules/ngx-perfect-scrollbar/dist/index.js;
rewrite ngx-perfect-scrollbar/dist/lib/index$ /j-lunker/node_modules/ngx-perfect-scrollbar/dist/lib/index.js;
rewrite ngx-perfect-scrollbar/dist/lib/(perfect-scrollbar\.\w+)$ /j-lunker/node_modules/ngx-perfect-scrollbar/dist/lib/$.js; # redirection config for perfect-scrollbar
rewrite /j-lunker/node_modules/perfect-scrollbar/(.*) /j-lunker/node_modules/ngx-perfect-scrollbar/node_modules/perfect-scrollbar/$; # redirection config for rxjs
rewrite rxjs/operators/index.js /j-lunker/node_modules/rxjs/operators.js;
rewrite rxjs/operators/(\w+/\w+\.js.*) /j-lunker/node_modules/rxjs/$;
rewrite rxjs/operators/([A-Z]\w+\.js.*) /j-lunker/node_modules/rxjs/$; # redirection config for @ngx-translate
rewrite @ngx-translate/core/src/(translate\.\w+)$ /j-lunker/node_modules/@ngx-translate/core/src/$.js;
rewrite @ngx-translate/core/index$ /j-lunker/node_modules/@ngx-translate/core/index.js;
rewrite @ngx-translate/core/src/util$ /j-lunker/node_modules/@ngx-translate/core/src/util.js;
rewrite @ngx-translate/core/src/missing-translation-handler$ /j-lunker/node_modules/@ngx-translate/core/src/missing-translation-handler.js;
} try_files $uri $uri/ /index.html?$args; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root html;
} location /rdk/service {
proxy_pass http://10.11.111.88:30000;
} location /file-upload/service {
proxy_pass http://10.11.111.88:3800;
} location /xplan {
proxy_pass http://10.11.111.88:40000;
} location /test/fang-resource{
root /home/fang;
#auth_basic "please input password:";
#auth_basic_user_file F:/.htpasswd;
} #文件上传存放路径,及ux资源实时打包存放路径
location /fang-file{
root /home/fang;
autoindex off;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:;
# 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 ;
# listen somename:;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 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;
# }
#} }

stop.sh

#!/bin/sh
DIRNAME=`dirname $`
HOME=`cd $DIRNAME/; pwd`
UMS_HOME=`cd $DIRNAME/../../; pwd` _NGINXCMD="$HOME/nginx-linux-x86_32" OSNAME=`uname` if [ $OSNAME = "Linux" ]; then
PLATFORM=`uname -p`
if [ $PLATFORM = "x86_64" ] ;then
_NGINXCMD="$HOME/nginx-linux-x86_64"
else
_NGINXCMD="$HOME/nginx-linux-x86_32"
fi
fi
if [ $OSNAME = "AIX" ] ;then
_NGINXCMD="$HOME/nginx-aix"
fi if [ $OSNAME = "SunOS" ] ;then
OSNAME2=`uname -m`
if [ $OSNAME2 = "i86pc" ]; then
_NGINXCMD="$HOME/nginx-solaris-x86"
else
_NGINXCMD="$HOME/nginx-solaris-sparc"
fi
fi echo ===============================================================================
echo HOME=$HOME
echo _NGINXCMD=$_NGINXCMD
echo =============================================================================== cd $HOME; pwd echo @WORK_DIR@ $HOME
echo @C_CMD@ nginx_id=`ps -ef | grep nginx | grep $_NGINXCMD | grep -v grep | awk '{print $2}'`
echo $nginx_id
worker_id_list=`ps -ef | grep nginx | grep $nginx_id | grep "worker process" | awk '{print $2}'`
echo $worker_id_list $_NGINXCMD -p $HOME/ -s stop
ps -p $nginx_id
if [ $? -eq ]; then
kill - $nginx_id
fi for worker_id in $worker_id_list
do
ps -p $worker_id
if [ $? -eq ]; then
echo kill - $worker_id
kill - $worker_id
fi
done

run.sh

#!/bin/sh
DIRNAME=`dirname $`
HOME=`cd $DIRNAME/; pwd`
UMS_HOME=`cd $DIRNAME/../../; pwd` _NGINXCMD="$HOME/nginx-linux-x86_32" OSNAME=`uname` if [ $OSNAME = "Linux" ]; then
PLATFORM=`uname -p`
if [ $PLATFORM = "x86_64" ] ;then
_NGINXCMD="$HOME/nginx-linux-x86_64"
else
_NGINXCMD="$HOME/nginx-linux-x86_32"
fi
fi
if [ $OSNAME = "AIX" ] ;then
_NGINXCMD="$HOME/nginx-aix"
fi if [ $OSNAME = "SunOS" ] ;then
OSNAME2=`uname -m`
if [ $OSNAME2 = "i86pc" ]; then
_NGINXCMD="$HOME/nginx-solaris-x86"
else
_NGINXCMD="$HOME/nginx-solaris-sparc"
fi
fi echo ===============================================================================
echo HOME=$HOME
echo _NGINXCMD=$_NGINXCMD
echo =============================================================================== cd $HOME; pwd echo @WORK_DIR@ $HOME
echo @C_CMD@
$_NGINXCMD -p $HOME/

update.sh

#!/bin/sh

echo "ued updating.......";
sleep ; cd $;
git reset HEAD .;
git checkout .;
git clean -xdf;
git checkout master;
git pull; echo "code already update!"; node $"/main.js"; echo "ued content already update!"; git add -A;
git commit -m 'Add Project Success';
git push origin master; echo "The file has been completed simultaneously!";

window  run.bat

echo on
title
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal set DIRNAME=. if "%OS%" == "Windows_NT" set DIRNAME=%~dp0% set ARGS=
:loop
if [%] == [] goto endloop
set ARGS=%ARGS% %
shift
goto loop
:endloop set HOME=%DIRNAME%
set _NGINXCMD=%DIRNAME%nginx.exe echo ===============================================================================
echo HOME=%HOME%
echo =============================================================================== cd /d "%HOME%"
echo @WORK_DIR@%HOME%
echo @C_CMD@
"%_NGINXCMD%"

window stop.bat

echo on
title
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal set DIRNAME=. if "%OS%" == "Windows_NT" set DIRNAME=%~dp0% set ARGS=
:loop
if [%] == [] goto endloop
set ARGS=%ARGS% %
shift
goto loop
:endloop set HOME=%DIRNAME%
set _NGINXCMD=%DIRNAME%nginx.exe echo ===============================================================================
echo HOME=%HOME%
echo =============================================================================== cd /d "%HOME%"
echo @WORK_DIR@%HOME%
echo @C_CMD@ "%_NGINXCMD%" -s stop

最新文章

  1. static变量引起的问题,List数据覆盖
  2. Android系统启动顺序
  3. Java多线程11:ReentrantLock的使用和Condition
  4. JAVA 设计模式 装饰者模式
  5. JavaScript的DOM操作。Window.document对象
  6. mvc model 传值两种方式区别
  7. Objective-C 代码规范(Code Style)
  8. nginx配置-http和https
  9. 如何用 Parse 和 Swift 搭建一个像 Instagram 那样的应用?(3)
  10. Atlas mysql的读写分离和负载均衡<转>
  11. [译]Stairway to Integration Services Level 14 - 项目转换(SSIS 2008 ~ SSIS 2012)
  12. img src某个php文件输出图片(回复更改图片readfile读取图片等)
  13. IOS开发中多线程的使用
  14. java面试总躲不过的并发(一): 线程池ThreadPoolExecutor基础梳理
  15. 6. 添加messager.alert()确定按钮的回调函数,即点完确定按钮后触发的事件
  16. [opentwebst]一个简单的登陆脚本
  17. Vue.js用脚手架创建项目
  18. “国家重点实验室”完全名单_洹水泛舟_新浪博客 - Google Chrome
  19. NET平台开源项目速览(6)FluentValidation验证组件介绍与入门(转载)
  20. 【日常训练】数据中心(CSP 201812-4)

热门文章

  1. onethink----网站配置信息调用!
  2. Oracle自动备份脚本的实现
  3. vue视频: 自定义指令 && 拖拽 && 自定义键盘信息
  4. 170518、FastDFS_配置文件详解
  5. loading图标modal弹窗 和jquery ajax的关系
  6. poj3974 Palindrome【回文】【Hash】【二分】
  7. Fatal error in launcher: Unable to create process using '"c:\python37\python3.exe" "C:\Python37\Scripts\pip3.exe" install opencv-python'
  8. ConcurrentHashMap实现解析
  9. Python开发【模块】:PyMySQL
  10. PostgreSQL数据库的安装与PostGIS的安装(转)