[Cherokee] Match virtual servers by port

70 views
Skip to first unread message

Julian Pietron

unread,
Nov 24, 2010, 6:19:27 PM11/24/10
to cherokee Mailing List
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hallo,

for one of my webservices it is required that under the same hostname
several webservices are available, discriminated by port (e.g., one
webservice on the default :80, the other one on :4040). Is there a way
to match a virtual server not by hostname but by port instead, or do I
indeed have to run two instances of cherokee to achieve this behaviour?
If so, are there any plans to change that in future releases? I'd
consider that a quite useful feature.

Thanks,
Julian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJM7Z1/AAoJENidYKvYQHlQWm0QAK0pxsPIJl9khlpyCrI+Om4P
YEpXpvvMp3zS9yhI7YCuC/Eu9HEcE2ijUD4y6hhaU27vwH/YGORC6nCMQolvkRfq
b24O+v44nrIAXIpvRjyflHwxMyn68SC9ZBiaSVU8hVAh4/71g8WaQ37rTIsK+b4D
0QJfZFVUtkL0m5vNjibjYx583mFpwCdaM3f6vDM6Ud8n2uDoV8BtUNHg/sWSWkxF
hsP+1phz1Dvnz5dWChX1Xbtzm5wkWHFo/0VuYEf6f8atkp+0P6raQcOeubPqASCv
dFEvyIoNe3cShaQlnmxzzBj0jYzvpIOPAQ6bRO8khI5Np9XKHYZNn/8rCTJMPNn8
H96UQzKr61Q0SH84eRw0zB6jckrwrk87BDTwSeDMATdmgUAVccEK86CcbQFQqZp+
80jW5ypsxPXvGWfdyUuv2ATrdG/iuY3dKpsYVxSp5X6nnLXFXMGnZkQCX+Kf25Yc
us5m7jyipYBkw3ZRQqgWHtzGfqjsXDpkk6Yy6hDgGtna84nDqAQF36B/K4D+D7v6
zCfI6v9dExB29zL3K+4JFVjnspM7ODGOrlEkF+Ucp3l9txEN44oSk0CBZBsXuXPA
ctYv5hFrOOLodoKy9IlKAYuYcCAui6fBlrvoEJ1nu7lVWmiaFTasJ8/K2EoXNPE2
2+4Ol3x4P1AXfSUIDyre
=NdVg
-----END PGP SIGNATURE-----
_______________________________________________
Cherokee mailing list
Cher...@lists.octality.com
http://lists.octality.com/listinfo/cherokee

Stefan de Konink

unread,
Nov 24, 2010, 6:29:42 PM11/24/10
to cherokee
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Op 25-11-10 00:19, Julian Pietron schreef:


> for one of my webservices it is required that under the same hostname
> several webservices are available, discriminated by port (e.g., one
> webservice on the default :80, the other one on :4040). Is there a way
> to match a virtual server not by hostname but by port instead, or do I
> indeed have to run two instances of cherokee to achieve this behaviour?
> If so, are there any plans to change that in future releases? I'd
> consider that a quite useful feature.

If you keep everything inside one virtual server, you can get this
behavior because you can have matching rules match on the port.


Stefan


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEAREKAAYFAkztn+YACgkQYH1+F2Rqwn3mAQCfbfOhhSN95I/dj0fYb8U827GC
up4An2ok+dg6MiPp9I4BnyyrBVEiBW+j
=SDbs

Alvaro Lopez Ortega

unread,
Nov 25, 2010, 1:40:05 AM11/25/10
to Julian Pietron, cherokee Mailing List
On 25/11/2010, at 00:19, Julian Pietron wrote:

> for one of my webservices it is required that under the same hostname
> several webservices are available, discriminated by port (e.g., one
> webservice on the default :80, the other one on :4040). Is there a way
> to match a virtual server not by hostname but by port instead, or do I
> indeed have to run two instances of cherokee to achieve this behaviour?
> If so, are there any plans to change that in future releases? I'd
> consider that a quite useful feature.

You have to use a "Incoming IP/Port" rule in your virtual server in order to filter that traffic. In case you needed more than a single rule to configure your service, you'd have to use rules like this:

(Incoming IP/Port: ALL:4040) AND (Directory: /example)
(Incoming IP/Port: ALL:4040) AND (RegEx: /example/.*\.foo)

--
Octality
http://www.octality.com/

Reply all
Reply to author
Forward
0 new messages