CentOS 笔记(四) Jexus部署相关
阅读原文时间:2023年07月15日阅读:1

①设置jexus 为服务

cd /lib/systemd/system/
sudo vi jexus.service

#注意 jexus 实际路径

[Unit]
Description=jexus
After=network.target

[Service]
Type=forking
ExecStart=/usr/jexus/jws start
ExecReload=/usr/jexus/jws restart
ExecStop=/usr/jexus/jws stop
PrivateTmp=true

[Install]
WantedBy=multi-user.target

三、设置开机启动

systemctl enable jexus.service

启动jexus服务

systemctl start jexus.service

停止jexus服务

systemctl stop jexus

重新启动服务

systemctl restart jexus.service

查看服务状态

systemctl status jexus.service

查看所有已启动的服务

systemctl list-units --type=service

参考 :https://www.cnblogs.com/xiaoyaodijun/p/9706525.html

②配置 jexus web 配置文件

cd /usr/jexus/siteconf

新增两个配置文件

######################

Web Site: Web1

########################################

port=80
root=/ /home/web/Web1
hosts=* #OR your.com,*.your.com

addr=0.0.0.0

CheckQuery=false

NoLog=true
AppHost={CmdLine=dotnet /home/web/Web1/Web1.dll;AppRoot=/home/web/Web1;Port=0}

NoFile=/index.aspx

Keep_Alive=false

UseGZIP=false

UseHttps=true

ssl.certificate=/x/xxx.crt #or pem

ssl.certificatekey=/x/xxx.key

ssl.protocol=TLSv1.0 # TLSv1.1 or TLSv1.2…

ssl.ciphers=

DenyFrom=192.168.0.233, 192.168.1.*, 192.168.2.0/24

AllowFrom=192.168.*.*

DenyDirs=~/cgi, ~/upfiles

indexes=myindex.aspx

Deny php,asp…

rewrite=^/.+?\.(asp|php|cgi|pl|sh|bash|dll)(\?.*|)$ /.deny->$1
rewrite=.*/editor/.+ /.deny->editor

reproxy=/bbs/ http://192.168.1.112/bbs/

host.Redirect=abc.com www.abc.com 301

ResponseHandler.Add=myKey:myValue

Jexus php fastcgi address is '/var/run/jexus/phpsvr'

#######################################################

fastcgi.add=php|socket:/var/run/jexus/phpsvr

php-fpm listen address is '127.0.0.1:9000'

############################################

fastcgi.add=php|tcp:127.0.0.1:9000

######################

Web Site: WebApi1

########################################

port=15000
root=/ /home/web/WebApi1
hosts=* #OR your.com,*.your.com

addr=0.0.0.0

CheckQuery=false

NoLog=true
AppHost={CmdLine=dotnet /home/web/WebApi1/WebApi1.dll;AppRoot=/home/web/WebApi1;Port=0}

NoFile=/index.aspx

Keep_Alive=false

UseGZIP=false

UseHttps=true

ssl.certificate=/x/xxx.crt #or pem

ssl.certificatekey=/x/xxx.key

ssl.protocol=TLSv1.0 # TLSv1.1 or TLSv1.2…

ssl.ciphers=

DenyFrom=192.168.0.233, 192.168.1.*, 192.168.2.0/24

AllowFrom=192.168.*.*

DenyDirs=~/cgi, ~/upfiles

indexes=myindex.aspx

Deny php,asp…

rewrite=^/.+?\.(asp|php|cgi|pl|sh|bash|dll)(\?.*|)$ /.deny->$1
rewrite=.*/editor/.+ /.deny->editor

reproxy=/bbs/ http://192.168.1.112/bbs/

host.Redirect=abc.com www.abc.com 301

ResponseHandler.Add=myKey:myValue

Jexus php fastcgi address is '/var/run/jexus/phpsvr'

#######################################################

fastcgi.add=php|socket:/var/run/jexus/phpsvr

php-fpm listen address is '127.0.0.1:9000'

############################################

fastcgi.add=php|tcp:127.0.0.1:9000

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章