CentOS 筆記(四) Jexus部署相關

①設置jexus 爲服務php

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

 

3、設置開機啓動html

systemctl enable jexus.service

  啓動jexus服務web

systemctl start jexus.service

中止jexus服務bash

systemctl stop jexus

從新啓動服務socket

systemctl restart jexus.service

查看服務狀態tcp

systemctl status  jexus.service

查看全部已啓動的服務php-fpm

systemctl list-units --type=service

 

參考 :https://www.cnblogs.com/xiaoyaodijun/p/9706525.htmlspa

 

 

②配置 jexus web 配置文件rest

cd /usr/jexus/siteconf

新增兩個配置文件code

######################
# 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
相關文章
相關標籤/搜索