{"id":39,"date":"2007-06-12T23:31:45","date_gmt":"2007-06-13T04:31:45","guid":{"rendered":"http:\/\/www.dannorris.com\/2007\/06\/12\/portal-virtual-host-configuration\/"},"modified":"2019-04-01T13:59:31","modified_gmt":"2019-04-01T13:59:31","slug":"portal-virtual-host-configuration","status":"publish","type":"post","link":"https:\/\/www.dannorris.com\/blog\/2007\/06\/12\/portal-virtual-host-configuration\/","title":{"rendered":"Portal Virtual Host Configuration"},"content":{"rendered":"<p>\t\t\t\tToday I configured Portal 10.1.2.0.2 on a test system to handle multiple virtual hosts. This was done as a proof-of-concept to support some work for a customer. We had a standard installation on a server named nap01.itconvergence.com with infrastructure on port 7780 and the middle tier using 7779 (HTTP server listen port) and 7778 (webcache listen port). The desired result of this configuration is to have two additional (virtual) hostnames be available on the middle tier. For our testing, we created fictional aliases named www.dan.com and www.houcine.com.<!--more--><\/p>\n<ol>\n<li>Add the necessary entries to the local hosts files on the server and any desktop PCs used for testing. It is important that the server be able to resolve these names quickly. As a result, you may also need to review the \/etc\/nsswitch.conf file on the server to make sure that &#8220;<code>hosts: files dns<\/code>&#8221; is present. If you &#8220;hijack&#8221; one or two domain names from the real world, the proper DNS entries might interfere with your testing if you don&#8217;t have <code>files<\/code> listed first. We use reserved IP address ranges, so obviously, these IP addresses won&#8217;t work for you. Here&#8217;s what we added to the \/etc\/hosts file on the server and also the c:\\windows\\system32\\drivers\\etc\\hosts.<\/li>\n<li>Add the following to the end of the httpd.conf file for the middle tier.\n<pre>\n### note that the Listen port is 7779, the Port (which is also the webcache listen port) is 7778\nNameVirtualHost *:7779\n&lt;VirtualHost *:7779&gt;\n  ServerName nap01.itconvergence.com\n  Port 7778\n  RewriteEngine On\n  RewriteOptions inherit\n&lt;\/VirtualHost&gt;\n&lt;VirtualHost *:7779&gt;\n  ServerName www.dan.com\n  Port 7778\n  RewriteEngine On\n  RewriteOptions inherit\n&lt;\/VirtualHost&gt;\n&lt;VirtualHost *:7779&gt;\n  ServerName www.houcine.com\n  Port 7778\n  RewriteEngine On\n  RewriteOptions inherit\n&lt;\/VirtualHost&gt;<\/pre>\n<\/li>\n<li>Update the distributed configuration repository with these manual changes using this command.<br \/>\n<code>$ORACLE_HOME\/dcm\/bin\/dcmctl updateconfig -ct ohs -d -v<\/code><\/li>\n<li>Configure the webcache for the new virtual hosts. Note that we reviewed the contents of Metalink note 406542.1 for this step since the supplied documentation was incorrect on this point. Here is the configuration you must make:\n<ul>\n<li> go to http:\/\/nap01.itconvergence.com:9400\/webcacheadmin<\/li>\n<li>log in as ias_admin\/password<\/li>\n<li>go to Site definitions<\/li>\n<li>Add a site for www.dan.com, port 7778 (rest of fields default)<\/li>\n<li>Add a site for www.houcine.com, port 7778 (rest of fields default)<\/li>\n<li>Then go to site-to-server mappings<\/li>\n<li>Select nap01.itconvergence.com, port 7778 and then click &#8220;Insert Above&#8221;<\/li>\n<li>Select the site definition you created earlier for www.dan.com and then check the checkbox for the origin server on nap01.itconvergence.com:7779<\/li>\n<li>Again, select nap01.itconvergence.com, port 7778 and then click &#8220;Insert Above&#8221;<\/li>\n<li>Select the site definition you created earlier for www.houcine.com and then check the checkbox for the origin server on nap01.itconvergence.com:7779<\/li>\n<li>Click Apply changes at the top of the page<\/li>\n<li>Click restart webcache once the operations management page appears<\/li>\n<\/ul>\n<\/li>\n<li>At this point, the HTTP path should be configured properly. Next, it&#8217;s on to the application configuration. The primary application we&#8217;re concerned with is Oracle Portal. For that, we&#8217;ll need to configure each Portal virtual host. These commands should do the trick:\n<pre>\ngo to $ORACLE_HOME\/portal\/conf\n### check for (and rename if desired) logfiles in $ORACLE_HOME\/portal\/logs after each run of ptlconfig below\n### note that the port # is the Port number in the httpd.conf file (not the Listen port)\n.\/ptlconfig -dad portal -sso -host nap01.itconvergence.com -port 7778\n.\/ptlconfig -dad portal -sso -host www.dan.com -port 7778\n.\/ptlconfig -dad portal -sso -host www.houcine.com -port 7778<\/pre>\n<\/li>\n<li>Then, we need to re-register the mod_osso partner application for each virtual host. The commands look intimidating, but don&#8217;t let them bother you. Note here again that the Oracle Portal 10.1.2 configuration guide also has these commands slightly wrong. Specifically, the config_file parameter is specified incorrectly and in order to avoid corrupting your configuration, you&#8217;ll need to ignore Oracle&#8217;s documentation.\n<pre>\n### note the port number in the mod_osso_url is the Port number from httpd.conf (not the Listen port)### first, back up the file\ncp $ORACLE_HOME\/Apache\/Apache\/conf\/osso\/osso.conf  $ORACLE_HOME\/Apache\/Apache\/conf\/osso\/osso.conf.20070612\n### for nap01.itconvergence.com--this should already be done, but doesn't hurt to repeat it\n$ORACLE_HOME\/sso\/bin\/ssoreg.sh\n  -site_name mod_osso_nap01.itconvergence.com:7778\n  -mod_osso_url http:\/\/nap01.itconvergence.com:7778\n  -config_mod_osso TRUE\n  -oracle_home_path $ORACLE_HOME\n  -config_file $ORACLE_HOME\/Apache\/Apache\/conf\/osso\/osso.conf\n  -admin_info cn=orcladmin \n\n### for www.dan.com\n$ORACLE_HOME\/sso\/bin\/ssoreg.sh\n  -site_name mod_osso_www.dan.com:7778\n  -mod_osso_url http:\/\/www.dan.com:7778\n  -config_mod_osso TRUE\n  -oracle_home_path $ORACLE_HOME\n  -config_file $ORACLE_HOME\/Apache\/Apache\/conf\/osso\/osso_www.dan.com.conf\n  -admin_info cn=orcladmin\n  -virtualhost\n\n### for www.houcine.com\n$ORACLE_HOME\/sso\/bin\/ssoreg.sh\n  -site_name mod_osso_www.houcine.com:7778\n  -mod_osso_url http:\/\/www.houcine.com:7778\n  -config_mod_osso TRUE\n  -oracle_home_path $ORACLE_HOME\n  -config_file $ORACLE_HOME\/Apache\/Apache\/conf\/osso\/osso_www.houcine.com.conf\n  -admin_info cn=orcladmin\n  -virtualhost<\/pre>\n<\/li>\n<li>Following the ssoreg.sh commands, you&#8217;ll have generated new OSSO configuration files with each command. The first command just regenerated the original file, but the last two commands will create new files. We need to modify the httpd.conf file to include references to these new files. Modify the original two &lt;VirtualHost&gt; sections for the virtual host names and include the two new parameters OssoConfigFile and OssoIpCheck.\n<pre>\n&lt;VirtualHost *:7779&gt;\n  ServerName www.dan.com\n  Port 7778\n  RewriteEngine On\n  RewriteOptions inherit\n<strong>  OssoConfigFile \/u04\/oracle\/product\/10.2.0\/midtier\/Apache\/Apache\/conf\/osso\/osso_www.dan.com.conf\n  OssoIpCheck off<\/strong>\n&lt;\/VirtualHost&gt;\n\n&lt;VirtualHost *:7779&gt;\n  ServerName www.houcine.com\n  Port 7778\n  RewriteEngine On\n  RewriteOptions inherit\n<strong>  OssoConfigFile \/u04\/oracle\/product\/10.2.0\/midtier\/Apache\/Apache\/conf\/osso\/osso_www.houcine.com.conf\n  OssoIpCheck off<\/strong>\n&lt;\/VirtualHost&gt;<\/pre>\n<\/li>\n<li>Once again, update the configuration repository with the dcmctl utility.\n<pre>\n$ORACLE_HOME\/dcm\/bin\/dcmctl updateconfig -ct ohs -d -v<\/pre>\n<\/li>\n<li>Almost done! Before restarting the components, you should flush the modplsql cache by deleting all the files and directories in $ORACLE_HOME\/Apache\/modplsql\/cache\/*.<\/li>\n<li>Finally, restart the OC4J_Portal and HTTP_Server components.\n<pre>\n### restart HTTPD and OC4J_Portal\n$ORACLE_HOME\/opmn\/bin\/opmnctl stopproc process-type=OC4J_Portal\n$ORACLE_HOME\/opmn\/bin\/opmnctl stopproc process-type=HTTP_Server\n$ORACLE_HOME\/opmn\/bin\/opmnctl startall<\/pre>\n<\/li>\n<\/ol>\n<p>Now that you&#8217;re done, you should be able to access http:\/\/nap01.itconvergence.com:7778\/pls\/portal just as before, plus also http:\/\/www.dan.com:7778\/pls\/portal and http:\/\/www.houcine.com:7778\/pls\/portal.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I configured Portal 10.1.2.0.2 on a test system to handle multiple virtual hosts. This was done as a proof-of-concept to support some work for a customer. We had a standard installation on a server named nap01.itconvergence.com with infrastructure on port 7780 and the middle tier using 7779 (HTTP server listen port) and 7778 (webcache &hellip; <a href=\"https:\/\/www.dannorris.com\/blog\/2007\/06\/12\/portal-virtual-host-configuration\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Portal Virtual Host Configuration&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,15,22],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-app-server","category-oracle","category-technical"],"_links":{"self":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":1,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/39\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}