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 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.
- 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 “
hosts: files dns
” is present. If you “hijack” one or two domain names from the real world, the proper DNS entries might interfere with your testing if you don’t havefiles
listed first. We use reserved IP address ranges, so obviously, these IP addresses won’t work for you. Here’s what we added to the /etc/hosts file on the server and also the c:\windows\system32\drivers\etc\hosts. - Add the following to the end of the httpd.conf file for the middle tier.
### note that the Listen port is 7779, the Port (which is also the webcache listen port) is 7778 NameVirtualHost *:7779 <VirtualHost *:7779> ServerName nap01.itconvergence.com Port 7778 RewriteEngine On RewriteOptions inherit </VirtualHost> <VirtualHost *:7779> ServerName www.dan.com Port 7778 RewriteEngine On RewriteOptions inherit </VirtualHost> <VirtualHost *:7779> ServerName www.houcine.com Port 7778 RewriteEngine On RewriteOptions inherit </VirtualHost>
- Update the distributed configuration repository with these manual changes using this command.
$ORACLE_HOME/dcm/bin/dcmctl updateconfig -ct ohs -d -v
- 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:
- go to http://nap01.itconvergence.com:9400/webcacheadmin
- log in as ias_admin/password
- go to Site definitions
- Add a site for www.dan.com, port 7778 (rest of fields default)
- Add a site for www.houcine.com, port 7778 (rest of fields default)
- Then go to site-to-server mappings
- Select nap01.itconvergence.com, port 7778 and then click “Insert Above”
- 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
- Again, select nap01.itconvergence.com, port 7778 and then click “Insert Above”
- 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
- Click Apply changes at the top of the page
- Click restart webcache once the operations management page appears
- At this point, the HTTP path should be configured properly. Next, it’s on to the application configuration. The primary application we’re concerned with is Oracle Portal. For that, we’ll need to configure each Portal virtual host. These commands should do the trick:
go to $ORACLE_HOME/portal/conf ### check for (and rename if desired) logfiles in $ORACLE_HOME/portal/logs after each run of ptlconfig below ### note that the port # is the Port number in the httpd.conf file (not the Listen port) ./ptlconfig -dad portal -sso -host nap01.itconvergence.com -port 7778 ./ptlconfig -dad portal -sso -host www.dan.com -port 7778 ./ptlconfig -dad portal -sso -host www.houcine.com -port 7778
- Then, we need to re-register the mod_osso partner application for each virtual host. The commands look intimidating, but don’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’ll need to ignore Oracle’s documentation.
### 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 cp $ORACLE_HOME/Apache/Apache/conf/osso/osso.conf $ORACLE_HOME/Apache/Apache/conf/osso/osso.conf.20070612 ### for nap01.itconvergence.com--this should already be done, but doesn't hurt to repeat it $ORACLE_HOME/sso/bin/ssoreg.sh -site_name mod_osso_nap01.itconvergence.com:7778 -mod_osso_url http://nap01.itconvergence.com:7778 -config_mod_osso TRUE -oracle_home_path $ORACLE_HOME -config_file $ORACLE_HOME/Apache/Apache/conf/osso/osso.conf -admin_info cn=orcladmin ### for www.dan.com $ORACLE_HOME/sso/bin/ssoreg.sh -site_name mod_osso_www.dan.com:7778 -mod_osso_url http://www.dan.com:7778 -config_mod_osso TRUE -oracle_home_path $ORACLE_HOME -config_file $ORACLE_HOME/Apache/Apache/conf/osso/osso_www.dan.com.conf -admin_info cn=orcladmin -virtualhost ### for www.houcine.com $ORACLE_HOME/sso/bin/ssoreg.sh -site_name mod_osso_www.houcine.com:7778 -mod_osso_url http://www.houcine.com:7778 -config_mod_osso TRUE -oracle_home_path $ORACLE_HOME -config_file $ORACLE_HOME/Apache/Apache/conf/osso/osso_www.houcine.com.conf -admin_info cn=orcladmin -virtualhost
- Following the ssoreg.sh commands, you’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 <VirtualHost> sections for the virtual host names and include the two new parameters OssoConfigFile and OssoIpCheck.
<VirtualHost *:7779> ServerName www.dan.com Port 7778 RewriteEngine On RewriteOptions inherit OssoConfigFile /u04/oracle/product/10.2.0/midtier/Apache/Apache/conf/osso/osso_www.dan.com.conf OssoIpCheck off </VirtualHost> <VirtualHost *:7779> ServerName www.houcine.com Port 7778 RewriteEngine On RewriteOptions inherit OssoConfigFile /u04/oracle/product/10.2.0/midtier/Apache/Apache/conf/osso/osso_www.houcine.com.conf OssoIpCheck off </VirtualHost>
- Once again, update the configuration repository with the dcmctl utility.
$ORACLE_HOME/dcm/bin/dcmctl updateconfig -ct ohs -d -v
- 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/*.
- Finally, restart the OC4J_Portal and HTTP_Server components.
### restart HTTPD and OC4J_Portal $ORACLE_HOME/opmn/bin/opmnctl stopproc process-type=OC4J_Portal $ORACLE_HOME/opmn/bin/opmnctl stopproc process-type=HTTP_Server $ORACLE_HOME/opmn/bin/opmnctl startall
Now that you’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.
This was a life saver. Not literally, but I really appreciate your taking the time to post this walk through. I have been having issues with my dev server portal instance, related to the osso registration, and this resolved my issue. The documentation is broken, as you stated.
Thanks again!
Glad to hear it! Thanks for stopping by and good luck with your configuration.
Dan
Thanks, this saved us a lot of trouble.
We were trying to set up different authentication mechanisms for internal and external users. The solution involved creating another virtual host and changing policy.properties in the SSO server so that external users were redirected to Oracle Identity Federation and internal users were redirected to the Oracle SSO login dialog.
We ran into problems because of the error in the documentation that you mentioned. Thanks for pointing that out, and for providing a good example of how to configure the webcache properly.
Thanks for stopping by–I’m glad it helped. I’d love to see a posting somewhere on the configuration you put together. Sounds like an interesting one to document for the rest of us!
This is wonderful guide… I would love that Oracle would do this kind of tutorials!!!
Great bloggin DAN!!
Br
Joao
Thanks for stopping by!
Dan
i have this problem with port 7778 in our server in our internet cafe. programs BitComet and CafeStation (timer) notes that the port 7778 is not listening. then my system unit restarts and does the same thing at start-up and all over again. im just a newbie in this kind of problem and im having a really hard time to fix it. can you help me please? thanks a lot!
@morz What problem? What is a “system unit”? You mean the server reboots?
system unit/cpu/case
yup, my computer reboots after it displays the “port 7778 is not listening”. i already fixed the problem on rebooting itself but still, the port 7778 is still their and i cant connect my pc/server to other workstations and to the internet. T_T
i already fixed it up ^^ well thanks anyways
Your blog include a very useful information!
Thanks a lot for sharing and all your effort , i enjoy your good and hard work
The best wishes
free image hosting
Hi Dan!
I am trying to do exaclty the same configuration for Portal with one virtual host but although I can access the portal from the main setup URL, when I try to access it from the Virtual Host , I get this error:
You cannot access this screen because the enabler configuration is missing. (WWC-41974)
This was also the error I was geting with the default Oracle documentation, but at that case when I accessed first the Portal from the virtual host URL, then also the main URL didn't work. So I guess following your config, I solved the problem with the different versions / virtual host.
I guess I am doing something wrong with the SSO registration…
Any ideas would be very welcome and helpful.
Thanks for your blog post anyway!
$ORACLE_HOME at steps 6 and under is the INFRA oracle home or the Portal (App) Oracle Home?
Thanks
The ORACLE_HOME throughout the process remains the middle tier (Portal) O_H–you never switch to use the INFRA O_H during this process as outlined in the post.
thanks! I have made it, it is the middle tier as you said! Thanks again for the tutorial
The ORACLE_HOME throughout the process remains the middle tier (Portal) O_H–you never switch to use the INFRA O_H during this process as outlined in the post.
thanks! I have made it, it is the middle tier as you said! Thanks again for the tutorial
You should get payed for this. What's your line of work? I'm pretty sure it's IT related otherwise why would you help us install our servers?
Fantastic works a treat.
However, when I go to the URL (e.g. http://www.dan.com) and try and login the URL for SSO login is redirected to (using your server names) http://nap01.itconvergence.com:7777/sso/jsp/login.jsp rather than http://www.dan.com. How do I change that?
I’d double-check the NameVirtualHost setting, but honestly this article is
more than 2.5 years old and I don’t work on OAS much these days, so I’m not
sure I have too much debugging help to provide anymore.
I really appreciate your step by step guide.
Fantastic sharing! That’s what I’m looking for!