Forum Discussion
help converting Apache Vhost to irule
NameVirtualHost 192.168.0.98:80
NameVirtualHost 192.168.0.98:443
ServerName test.abc.com
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
CustomLog logs/test.abc.com.access combined
ErrorLog logs/test.abc.com.error
ServerName test.abc.com
RewriteEngine and SSLProxyEngine off unless needed in the future
RewriteEngine On
SSLProxyEngine on
ProxyPreserveHost On
SSLEngine on
SSLCertificateFile conf/ssl.crt/test.abc.com.crt
SSLCertificateKeyFile conf/ssl.key/test.abc.com.key
SSLCertificateChainFile conf/ssl.int/godaddyint.crt
SSLRequireSSL
Order deny,allow
Allow from all
AllowCONNECT 443
ProxyPass /pc/center/webservice http://127.0.0.1/pc/center/webservice
ProxyPass /sso https://192.168.2.82:8382/sso
ProxyPass / https://192.168.2.82:443/
ProxyTimeout 300
Bug in CAPC causes us to define a DefaultType (RTC 124083). Addressed in sprint 4 socrates.
DefaultType text/html
CustomLog logs/test.abc.com.access combined
ErrorLog logs/test.abc.com.error
4 Replies
- Kevin_Stewart
Employee
There are a couple of things to cover here:when CLIENT_ACCEPTED { set default_pool [LB::server pool] } when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/sso" } { pool sso_pool } else { pool default_pool } }
- Billy_10041
Nimbostratus
thanks - Thomas_Brown_12
Nimbostratus
This method somehow seems very cumbersome to me... Suppose you had a lot of these vHosts, say 1000 or more. Is it necessary to create 1000 individual virtual hosts each using this kind of an iRule but each with their own uniquely-named pool and maybe even their own unique Data Group (in the case of ProxyPass), or is there a better way to create some kind of translation matrix for this?
-Tom
- Kevin_Stewart
Employee
Well, if you simply need a 1-1 mapping from a URI to a specific IP and port, then a single managed data group would probably work best.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com