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

linux 前端部署的更多相关文章

  1. Linux项目部署发布

    Linux项目部署发布 1.部署环境准备,准备python3和虚拟环境解释器,virtualenvwrapper pip3 install -i https://pypi.douban.com/sim ...

  2. 以self-contained方式在Linux上部署ASP.NET Core站点

    今天准备将一个在Windows上用VS2015开发的ASP.NET Core程序部署到阿里云Linux服务器上,部署时发现这台服务器是内网服务器,无法直接安装.NET Core SDK,于是想到尝试用 ...

  3. Linux下部署FTP服务器

    Linux下部署FTP服务器 下载安装包 在这里介绍的是离线部署FTP,首先下载对应的rpm包,下载链接为: 下载vsftpd服务 下载FTP客户端 安装ftp服务器 关闭防火墙 service ip ...

  4. Linux系统部署体验中心

    Linux系统部署体验中心 安装Linux虚拟机 1.  下载安装VMware,安装64位Linux系统(Ubuntu),要求:CPU双核,2G内存,60G硬盘 2.  安装系统时,选择安装ssh服务 ...

  5. linux下部署项目问题

    1. 今天linux下部署thinkphp项目,数据库用的mysql. 页面其他都是正常的,但是从数据库中取出的数据都是乱码.最后查了资料 解决方案: 在ThinkPHP里面 Library\Thin ...

  6. linux 下部署nodejs(两种方式)

    本次博客的编写时用的系统环境,刚装好的Centos 6.4  64位虚拟机. 另外关于linux 其他系统的安装 可以参考https://github.com/joyent/node/wiki/Ins ...

  7. Linux下部署Symfony2对app/cache和app/logs目录的权限设置

    在linux下部署完Symfony2,可能在访问的时候会报app/logs或者app/cache目录没有写权限的错误.在linux下,如果我们在命令行登陆的用户和web应用服务器(apache.ngi ...

  8. Linux中部署JAVA程序

    JAVA程序在开发完成后,需要部署到服务器,如果是WEB项目,需要部署到WEB服务器,否则部署到应用服务器. JAVA是跨平台的编程语言,服务器的操作系统可以是Windows.Linux或者其它,下面 ...

  9. Linux系统部署规范v1.0

    Linux系统部署规范v1.0 目的: 1.尽可能减少线上操作: 2.尽可能实现自动化部署: 3.尽可能减少安装服务和启动的服务: 4.尽可能使用安全协议提供服务: 5.尽可能让业务系统单一: 6.尽 ...

随机推荐

  1. 170602、防止sql注入(一)

    一.SQL注入简介 SQL注入是比较常见的网络攻击方式之一,它不是利用操作系统的BUG来实现攻击,而是针对程序员编程时的疏忽,通过SQL语句,实现无帐号登录,甚至篡改数据库. 二.SQL注入攻击的总体 ...

  2. VS2012/2013引用对话框的糟糕设计

    先看两张图: 1. 首次打开引用对话框(Reference Manager),Name显示不全: (图1) 2. 然后双击或拖动splitter,让Name显示全: (图2) 3. 下次再打开引用对话 ...

  3. Python开发【Django】:缓存、信号

    缓存 由于Django是动态网站,所有每次请求均会去数据进行相应的操作,当程序访问量大时,耗时必然会更加明显,最简单解决方式是使用:缓存,缓存将一个某个views的返回值保存至内存或者memcache ...

  4. 洛谷P2024 食物链 [NOI2001] 并查集

    正解:并查集 解题报告: 传送门(咕了! 其实没有很难(虽然我是交了三发才过的QAQ 但是一来好久没打并查集了恢复一下智力 二来看着智推里唯一一个蓝就很不爽(,,,虽然做了这题之后又补上了个蓝题QAQ ...

  5. LeetCode——Palindrome Number

    Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negativ ...

  6. 【开发者笔记】MQTT python测试笔记

    MQTT是基于订阅/发布的物联网协议. python测试需要一个发送进程和接收进程,即一个发送客户端和一个接收客户端,如果这两个客户端工作在同一个topic下,那么就能进行消息互通了. 服务器用“io ...

  7. JDK eclipse selenium的安装以及环境变量的配置

    未经允许,禁止转载!!!  未经允许,禁止转载!!! 首先下载安装JDK: 然后双击进行安装 选着第一个:开发工具!点击next 一定要记住:Install to: C:\Program Files\ ...

  8. js 中的[] {}是什么意思

    <div id="aa1">aaaaa</div><div id="aa2">bbbb</div><div ...

  9. 27Tcp文件传输

    前面介绍了TCP和UDP的通信,只是文体通信,只能传送文字.本次介绍文件传输,也就是文件读写和TCP通信的结合. 解析:根据之前的TCP通信,建立彼此的连接.服务器选择文件,首先将文件的基本信息发送给 ...

  10. zw版【转发·台湾nvp系列Delphi例程】HALCON DispArc

    zw版[转发·台湾nvp系列Delphi例程]HALCON DispArc zw版[转发·台湾nvp系列Delphi例程]HALCON DispArc----------RAD Studio XE D ...