Mono+Jexus部署Web页面

一、web页面

二、Jexus默认站点的配置文件(只需修改站点路径)

######################
# Web Site: Default
########################################

port=80
root=/ /var/www/iot-ems
hosts=*    #OR your.com,*.your.com

# addr=0.0.0.0
# CheckQuery=false
NoLog=true
# AppHost.Port=5000
# NoFile=/index.aspx
# Keep_Alive=false
# UseGZIP=false
# UseHttps=true
# DenyFrom=192.168.0.233, 192.168.1.*, 192.168.2.0/24
# AllowFrom=192.168.*.*
# DenyDirs=~/cgi, ~/upfiles
# indexes=myindex.aspx
# rewrite=^/.+?\.(asp|php|cgi|pl|sh)$ /index.aspx
# 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

三、Dockerfile

FROM mono
MAINTAINER willem "willem@xcloudbiz.com"

RUN apt-get update \
  && apt
-get -y upgrade
RUN cd /opt \
  && apt
-get -y install wget \
  &&
wget linuxdot.net/down/jexus-5.8.1.tar.gz \
  && tar
-zxvf jexus-5.8.1.tar.gz \
  && .
/jexus-5.8.1/install \
  && apt-get -y autoremove --purge wget COPY
default /usr/jexus/siteconf/default ADD . /var/www/iot-ems EXPOSE 80 CMD /usr/jexus/jws start && tail -f

然后构建新镜像,然后运行容器即可访问(容器自动重启)。

docker build -t jexus:16.4.14 .
docker run --restart=always -d -p 8888:80 --name jexus jexus:16.4.14

访问地址:主机ip:8888

 

posted @ 2016-04-14 15:38  离线中  阅读(616)  评论(0编辑  收藏  举报