当前位置: 技术问答>java相关
在一个resin里怎么配置两个http的访问端口呢?
来源: 互联网 发布时间:2015-08-05
本文导语: 现在有一个resin2.0.4,起了两个srun,比如一个是6802,另一个是6803,那么现在我需要在这上面配置两个http的端口,比如一个为80,另一个为8080,在start这个resin过后,要求分别访问http://127.0.0.1:80和http://127.0.0.1:8080能访问到...
现在有一个resin2.0.4,起了两个srun,比如一个是6802,另一个是6803,那么现在我需要在这上面配置两个http的端口,比如一个为80,另一个为8080,在start这个resin过后,要求分别访问http://127.0.0.1:80和http://127.0.0.1:8080能访问到指定的不同的jsp文件。我是用了两个来配置,但好象后一个不起作用,请问应该怎么做呢?
|
What I can find:(suggest to download resin-reference.pdf)
host
Defines a virtual host. If no hosts are specified, or if a request doesn't match a host,
Copyright (c) 1998-2002 Caucho Technology. All rights reserved
- 101 -
configuration in http-server will be used instead.
The id may contain a list of hosts. Any host in the list will match.
See application configuration for servlet configuration.
Hosts can use regexp instead of id to dynamically create new hosts.
Attribute Meaning Default
id The host name required
regexp A regular expression
matching hosts.
none
app-dir The root directory of the
host (can use
replacement vars)
use http-server app-dir
Any resource configured in is shared for all virtual hosts and
web-apps in the server. So a database or EJB server configured in the will
be shared for all virtual hosts.
Default application tags like may appear in the section.
These tags will be defaults for the contained and .
...
Note: Only the Resin Java process understands regexps. Because mod_caucho,
isapi_srun and the other web server plugins don't understand the regexps, you may need
to do additional work to make the web server send the request to Resin.
Default: If the id attribute is null or '*', the will be used as the default configuration
for any virtual host that doesn't match a specific block.
http
Defines a HTTP or SSL port for the standalone server.
Attribute Meaning
Resin Reference Servlet and Host Configuration - p. 102
Copyright (c) 1998-2002 Caucho Technology. All rights reserved
- 102 -
id http identifier name
host The listening host
port The listening port
virtual-host Virtual host to select a host block.
ssl enable ssl
key-store-type JSSE Type of the key store (default jks)
key-store-file JSSE File containing the certificates
key-store-password JSSE Password to read the certificates
certificate-file OpenSSL certificate (Resin 2.0.5)
certificate-key-file OpenSSL key certificate (Resin 2.0.5)
certificate-key-password OpenSSL key password (Resin 2.1.1)
crypto-device OpenSSL engine (Resin 2.0.5)
thread-max Maximum number of live threads.
thread-min Minimum number of live threads.
thread-keepalive Number of keepalive threads
request-timeout Max time for a request, after this the
request will be interrupted.
listen Value of the socket listen parameter
accept-buffer-size Number of sockets in the accept buffer.
shutdown-wait-time How long to wait for connections to finish
before exiting.
Basic HTTP configuration
...
JSSE configuration
true
pkcs12
keys/server.p12
changeit
...
Resin Reference Servlet and Host Configuration - p. 103
Maybe you can (not tested):
...
DIY
host
Defines a virtual host. If no hosts are specified, or if a request doesn't match a host,
Copyright (c) 1998-2002 Caucho Technology. All rights reserved
- 101 -
configuration in http-server will be used instead.
The id may contain a list of hosts. Any host in the list will match.
See application configuration for servlet configuration.
Hosts can use regexp instead of id to dynamically create new hosts.
Attribute Meaning Default
id The host name required
regexp A regular expression
matching hosts.
none
app-dir The root directory of the
host (can use
replacement vars)
use http-server app-dir
Any resource configured in is shared for all virtual hosts and
web-apps in the server. So a database or EJB server configured in the will
be shared for all virtual hosts.
Default application tags like may appear in the section.
These tags will be defaults for the contained and .
...
Note: Only the Resin Java process understands regexps. Because mod_caucho,
isapi_srun and the other web server plugins don't understand the regexps, you may need
to do additional work to make the web server send the request to Resin.
Default: If the id attribute is null or '*', the will be used as the default configuration
for any virtual host that doesn't match a specific block.
http
Defines a HTTP or SSL port for the standalone server.
Attribute Meaning
Resin Reference Servlet and Host Configuration - p. 102
Copyright (c) 1998-2002 Caucho Technology. All rights reserved
- 102 -
id http identifier name
host The listening host
port The listening port
virtual-host Virtual host to select a host block.
ssl enable ssl
key-store-type JSSE Type of the key store (default jks)
key-store-file JSSE File containing the certificates
key-store-password JSSE Password to read the certificates
certificate-file OpenSSL certificate (Resin 2.0.5)
certificate-key-file OpenSSL key certificate (Resin 2.0.5)
certificate-key-password OpenSSL key password (Resin 2.1.1)
crypto-device OpenSSL engine (Resin 2.0.5)
thread-max Maximum number of live threads.
thread-min Minimum number of live threads.
thread-keepalive Number of keepalive threads
request-timeout Max time for a request, after this the
request will be interrupted.
listen Value of the socket listen parameter
accept-buffer-size Number of sockets in the accept buffer.
shutdown-wait-time How long to wait for connections to finish
before exiting.
Basic HTTP configuration
...
JSSE configuration
true
pkcs12
keys/server.p12
changeit
...
Resin Reference Servlet and Host Configuration - p. 103
Maybe you can (not tested):
...
DIY
|
在这里的附近加入
可以有两个不同的端口,至于指向不同的文件的话,我就不知道了。