Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gus Heck
portal instance virtual host
April 10, 2012 12:25 PM
Answer

Gus Heck

Rank: Junior Member

Posts: 40

Join Date: November 16, 2011

Recent Posts

I tried to create a second portal instance, and it keeps telling me to

"Please enter a valid virtual host."

The main instance is running with localhost as the virtual host, and works fine, but I don't seem to be able to get anything else to work. (and yes I'm using names by which my machine is network addressable, currently they bring me to the same place as localhost, and I'd like to see it be a different site when I hit it with a different name). Unfortunately the error message tells me absolutely nothing about what is wrong with the virtual host name that I entered. ("pheck-l" for example) emoticon
Erik Pronk
RE: portal instance virtual host
April 18, 2012 5:58 AM
Answer

Erik Pronk

Rank: New Member

Posts: 7

Join Date: June 1, 2010

Recent Posts

Hi Gus,

Did you solve this issue? I am getting this error also.

Regards Erik
Gus Heck
RE: portal instance virtual host
April 18, 2012 7:29 AM
Answer

Gus Heck

Rank: Junior Member

Posts: 40

Join Date: November 16, 2011

Recent Posts

No I didn't, and I had to move on to something else. I may get back to it but I don't have a solution now. sorry.

The error message is terribly confusing... probably the best thing is to go read the code and see what the logic is that triggers it.
jaid shaik
RE: portal instance virtual host
April 18, 2012 11:23 AM
Answer

jaid shaik

Rank: Regular Member

Posts: 170

Join Date: October 7, 2010

Recent Posts

HI Gus,

Check this link for multiple portal instance link



Thanks
Jiad.Shaik
Gus Heck
RE: portal instance virtual host
April 19, 2012 2:45 PM
Answer

Gus Heck

Rank: Junior Member

Posts: 40

Join Date: November 16, 2011

Recent Posts

looks similar to what I did... However I just spied some code that might be the source of the problem..

1    public Company checkCompany(String webId, String mx, String shardName)
2        throws PortalException, SystemException {
3        Date now = new Date();
4
5        Company company = companyPersistence.fetchByWebId(webId);
6
7        if (company == null) {
8            [color=#fd0101]String virtualHostname = webId;[/color]


This is in company local service... it appears that if the company isn't found already, the code throws out whatever you entered in your virtual host field and uses the web id for no discernable reason...

(later the code tries to create the company that wasn't found, and it tries to validate the virtual host, which is now set to what you put in the web id field not the virtual host field)
Gowtham Mani
RE: portal instance virtual host
April 27, 2012 5:56 AM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

Hi,

Can you tell me what is the virtual host name used ?
Gus Heck
RE: portal instance virtual host
May 1, 2012 9:30 AM
Answer

Gus Heck

Rank: Junior Member

Posts: 40

Join Date: November 16, 2011

Recent Posts

The virtual host name doesn't actually get used. (the field could be omitted from the form, except it might be validated even though it's not used). The code does a check for the company that passes in a companyid. Since you are creating a company (i.e. new portal instance), the code creates one, but it uses the webid for the virtual host. This is almost certainly a bug resulting from the use of a method called "checkCompany" which actually has behavior consistent with a name more like "createCompanyIfNeeded".

The workaround is to enter the virtual host name in both the web id field and the virtual host field. If you enter something in the web id field that is not a valid domain name (i.e. doesn't have a '.' in it etc) then you will get the error I reported at the top of this thread.

I was entering

1WebId: foo
2VirtualHost: foo.copyright.com


and that fails, but

1WebId: foo.copyright.com
2VirtualHost: foo.copyright.com


succeeds.
Gowtham Mani
RE: portal instance virtual host
May 1, 2012 10:02 AM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

Thanks for the update will help someone
Ben Chapman
RE: portal instance virtual host
August 23, 2012 7:22 AM
Answer

Ben Chapman

Rank: New Member

Posts: 23

Join Date: March 7, 2011

Recent Posts

Thanks for this! This got me started at least. 6.1 EE.