cancel
Showing results for 
Search instead for 
Did you mean: 

How to create and access a Virtual Host on the J2EE WAS?

Former Member
0 Kudos

Hello, I have searched through the Forums and help.sap.com and found a lot of information on how to set up a Virtual Host on the J2EE server but am having issues with it working.

The goal is to provide a simple virtual host on the J2EE Portal server to host some static image and HTML files. Previously I had stored these files in the standard publicly accessible SAP J2EE folder location /usr/sap/<SID>/JCxx/j2ee/cluster/serverx/apps/sap.com/com.sap.engine.docs.examples/servlet_jsp/_default/root/. This location is resolved to when using the URL <host>:50000 for example.

The main issue here is that during Portal support pack applications this folder gets wiped out and we have to remember to save off any custom files and folders in this location and replace them.

I would like to create a virtual host to store these static files (i.e., branding-image.jpg, etc...).

I have run through the process of creating the virtual host both using Visual Administrator and <host>:50000/nwa but am not able to get the virtual host name to resolve properly.

The following are the steps that I have taken. Let's assume the standard SAP portal (i.e., xSS, etc...) is running properly on <host>:50000.

1. create virtual host via Visual Administrator/NWA called 'sapwebserver1' by using the Create Host option (takes on the attributes of the 'default' standard virtual host)

2. change the root directory for this virtual server to a custom folder at E:/tmp/mimes (where E:/usr is where the J2EE files are all installed), no start files were set up and nothing else was changed in the new virtual host record, no permissions were changed on the /tmp/mimes folder from whatever the default Windows user permissions are normally set, I am using a local Windows administrator account but I have not seen any reference in the help files or the examples that indicate that any specific permissions updates need to be made on the virtual host root folder

3. restarted the J2EE server as well as the HTTP Provider service

4. before updating the company DNS, I wanted to test this locally on the server and so have updated the server's local HOSTS file with a <host IP address> sapwebserver1 entry

5. from that server I can ping the sapwebserver1 virtual host name and it resolves properly to the machine's physical IP address

According to all of the documentation and examples I have seen I should now be able to (from that server) launch a browser and access the static files in the virtual host by referring to http://sapwebserver1:50000/branding-image.jpg for example. This is not working and the browser just brings up a Cannot display the web page error in IE. By referring to the virtual host name sapwebserver1:50000 it's supposed to hit the J2EE server and based on the host name sapwebserver1 realize that it should resolve to the root directory E:/tmp/mimes. This is not happening. Just as a test I have created a copy of the 'default' virtual host and called it sapwebserver2, updated the local HOSTS file for this entry, and tried to see if that would work like the 'default' host. My expectation was that http://sapwebserver2:50000 would behave the same was as http://<host>:50000 but it too fails to resolve just like the sapwebserver1 virtual host refernce.

Would anyone happen to have any pointers on what to do next? I just want a simple virtual host to be able to serve up some static images and files.

Thanks for any insight or assistance you might be able to provide here.

Graham

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

This seems to be a case of DNS resolution. Maybe you can try nslookup <host-name> from the command prompt if it is a Windows machine, you can check with your network team.

Former Member
0 Kudos

Why don't you host these static files on IIS or Apache???

Former Member
0 Kudos

This defeats the purpose of trying to centralize SAP-related web resources on the SAP server. Typically IIS/Apache or other non-SAP servers are under the control of IT and not the SAP BASIS group.

We simply would like to have a centralized location to store static web files so that they are not overwritten during Portal support pack applications.

Former Member
0 Kudos

Did you get this fixed?

Former Member
0 Kudos

Nope...I never was able to get this issue resolved. I'm actually going to look into this again now...any additional thoughts would be appreciated.

Graham

Former Member
0 Kudos

sorry for the ugly strung-together formatting but the SDN format tags are not being recognized