We're running a CA Access Gateway (SPS) and when we try to reach the
server root url, then the CA Access Gateway (SPS) reports an error in
the browser :
CA Access Gateway - Error Report
Error Details
Request URI: /
Error Type: SPS Exception
Error Code: VirtualHostNotFound
Error Message: Virtual host is not properly configured.
How can we fix that ?
CA Access Gateway (SPS) 12.8SP3 on RedHat 7;
Looking at the host file, we see that the host FQDN is bound to the
loopback interface instead of the public IP :
hosts :
127.0.0.1 mysps.mydomain.com
10.0.0.1 myhost
The default virtualhost is configured with the host FQDN
mysps.mydomain.com :
server.conf :
<VirtualHostDefaults>
# default session scheme
defaultsessionscheme="default"
enablerewritecookiepath="no"
enablerewritecookiedomain="no"
enableproxypreservehost="no"
filteroverridepreservehost="no"
# specify the block size for request and response in KBs
requestblocksize="4"
responseblocksize="4"
#TO-DO: Define any session scheme mappings
#<SessionSchemeMappings>
# user_agent_name=session_scheme_name
#</SessionSchemeMappings>
# Web Agent.conf
<WebAgent>
sminitfile="/opt/CA/secure-proxy/proxy-engine/conf/defaultagent/WebAgent.conf"
</WebAgent>
</VirtualHostDefaults>
# Default Virtual Host
<VirtualHost name="default">
#addresses="192.168.1.100"
hostnames="mysps.mydomain.com"
defaultsessionscheme="default"
# specify the block size for request and response in KBs
requestblocksize="4"
responseblocksize="8"
#The defaults can be overridden
#not only for the Virtual Host
#but for the WebAgent for that
#virtual host as well
#<WebAgent>
#</WebAgent>
</VirtualHost>
Modify the hosts file :
From
127.0.0.1 mysps.mydomain.com
10.0.0.1 myhost
To
127.0.0.1 localhost
10.0.0.1 mysps.mydomain.com myhost
and restart CA Access Gateway (SPS) to solve this issue.