Weblogic virtual host configuration
Hi,
Can anyone explain to me what is virtual host.
what is the significance and purpose of the same.
in what scenario should we configure a virtual host.
and what is the benefit of the same.
from the documentation i did not understand the concept.
Thanks in advance.
I think this page is pretty clear. Does this help?
http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e13952/pagehelp/Corecorevirtualhosttabletitle.html
A virtual host is a set of host names to which WebLogic Server instances (servers) or clusters respond. When you use virtual hosting, you use DNS to specify one or more host names that map to the IP address of a server or cluster. You also specify which Web applications are served by each virtual host.
Similar Messages
-
Virtual Hosts configuration in JServ.conf
I was trying to configure virtual hosts in the Jserv.conf file like this:
NameVirtualHost 138.1.104.151
# directives for vhost1
<VirtualHost 138.1.104.151:10001>
ServerName gsyang-lap.xyz.com
<IfModule mod_jserv.c>
ApJServDefaultHost gsyang-lap.xyz.com
ApJServProperties "C:\ORCL\ias\Apache\Jserv\conf\jserv_1.properties"
ApJServLogFile "C:\ORCL\ias\Apache\Jserv\logs\mod_jserv_1.log"
</IfModule>
</VirtualHost>
# directives for vhost2
<VirtualHost 138.1.104.151:10002>
ServerName gsyang-lap.us.oracle.com
<IfModule mod_jserv.c>
ApJServDefaultHost gsyang-lap.xyz.com
ApJServProperties "C:\ORCL\ias\Apache\Jserv\conf\jserv_2.properties"
ApJServLogFile "C:\ORCL\ias\Apache\Jserv\logs\mod_jserv_2.log"
</IfModule>
</VirtualHost>
After I saved the file and tried to stop/restart the Apache server, I got any warning, saying:"NameVirtualHosts 138.1.104.151 has not virtual hosts". Any idea as to how to fix this problem? Thanks in advance.
SunnyHi,
This seems to be a SO error more than an IAS error.
Have you tried stopping the iAS Server and looking for and old process still running?
It may not be a problem with the file open limit, but may be the one it is trying to user is still in use by and old process.
Carlos -
Virtual Hosts - Configured but still not working -
I configured virtual hosts in my portal so that multiple companies can access there portal with their own domain name. It seems to work fine when i give the a direct link to the site. But some times the original server name is written back on the urls. For example, i am in www.abc.com/portal/page/portal/some_page and it will go back to www.original_server_name.com /pls/portal/page/portal while i am browsing. It doesn't do this for all of them. Is there something i need to set up??
Ok,
I reinstalled a new oracle portal from scratch and followed the virtual hosts guide by dannorris.com which stated that there where errors in the oracle documentation. After following the guide, the virtual hosts work when you go to the http://virtual_host_name.com. It sends you to the "Welcome to Oracle Application Server" page. However when you go and click the link that states
"To manage and monitor Oracle Application Server Portal, log on to Oracle Application Server Portal:
username: portal
password: ias_admin password specified during install"
it kicks you back to the original host name url. Any ideas??
I have multiple clients that need to login and see their domain names only and not the real server name. -
Webdav/virtual host configuration problem
Hi folks,
I have a web server behind firewall, which redirects port 80 to my server's internal IP, 192.168.6.222. I did setup 3 virtual domains there:
blogs.domain.com at *
wiki.domain.com at *
dav.domain.com at *
each site has different root and dav site has its own realm set.
I just found that virtual domains are not working and dav.domain.com doesn't work at all. When I switch dav.domain.com to 192.168.6.222, it eats all connections and even for blogs site shows login sheet.
$ httpd -S
Processing config directory: /etc/httpd/sites/*.conf
Processing config file: /etc/httpd/sites/0000any_80blogs.domain.com.conf
Processing config file: /etc/httpd/sites/0001any_80wiki.domain.com.conf
Processing config file: /etc/httpd/sites/0002any_80dav.domain.com.conf
Processing config file: /etc/httpd/sites/virtualhostglobal.conf
VirtualHost configuration:
wildcard NameVirtualHosts and default servers:
*:80 is a NameVirtualHost
default server blogs.domain.com (/etc/httpd/sites/0000any_80blogs.domain.co.conf:3)
port 80 namevhost blogs.domain.com (/etc/httpd/sites/0000any_80blogs.domain.co.conf:3)
port 80 namevhost wiki.domain.com (/etc/httpd/sites/0001any_80wiki.domain.com.conf:3)
port 80 namevhost dav.domain.com (/etc/httpd/sites/0002any_80dav.domain.com.conf:3)Hi Simon
You are not doing anything wrong. Setting up a virtual host has obviously
worked as you can access it. You still have to specify the port number as
it is not running on the standard port 80 that your browser assumes if you
do not explicitly state it.
regards
Nick
"Simon Pierre NOLIN" <[email protected]> wrote in message
news:3be7f4f1$[email protected]..
>
Hi!
I try to configure a virtual host but it doesn't work. I have create it(name=myVirtualHost,
virtual host names=gandalf.foo.com). I assigne it to my managed server(port 5021).
In the managed server i have a web application calls "rings". If i typethe url,
gandalf.foo.com/rings/login : 404 not found error. BUT if i usegandalf.foo.com:5021/rings/login
: it works.
Can someone explain me what i do wrong?
Regards
Simon Pierre NOLIN -
10.5.1 Broken Mail Server - virtual host configuration
Hi,
I have been trying to set up my mail server (new 10.5.1 build) to run with virtual hosts. I read pterobyte's tutorial ( Making Virtual Mail Users in OS X 10.4/10.5 Server) and implemented his suggested workarounds. However, it doesn't seem to have worked. I am now concerned that I have screwed things up beyond reprieve and need help to get it working again.
To give a start, I have included my postconf output below:
swallowtail:postfix serverconfig$ postconf -n
alias_maps = hash:/etc/aliases,hash:/var/mailman/data/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debugpeerlevel = 2
enableserveroptions = yes
html_directory = no
inet_interfaces = all
mail_owner = _postfix
mailboxsizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mapsrbldomains =
messagesizelimit = 10485760
mydestination = $myhostname,localhost.$mydomain,localhost,inovaplus.com
mydomain = inovaplus.com
mydomain_fallback = localhost
myhostname = swallowtail.inovaplus.com
newaliases_path = /usr/bin/newaliases
ownerrequestspecial = no
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost = mailfilter.fastnet.co.uk
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpdclientrestrictions = permit_mynetworks rejectrblclient sbl-xbl.spamhaus.org rejectrblclient zen.spamhous.org permit
smtpdpw_server_securityoptions = none
smtpdrecipientrestrictions = permitmynetworks,reject_unauthdestination,permit
smtpduse_pwserver = no
unknownlocal_recipient_rejectcode = 550
virtualaliasdomains = hash:/etc/postfix/virtual_domains
virtualaliasmaps = hash:/etc/postfix/virtual
virtualmailboxdomains = hash:/etc/postfix/virtual_domains
virtual_transport = lmtp:unix:/Volumes/Private/Mail/socket/lmtpSame issue here. I am current on all system updates. I have noticed this with any photoshop cs3 jpeg file. When using "mail", attached photoshop jpeg files show up as a plain text document "What???" Using Automator produces the same results. I did not have this problem with 10.5.1. I can't mail out any photoshop jpeg files?!@%* I just got off the phone with apple tech support and they told me that Adobe has not yet updated their software to comply with Leopard. Come on. Cover flow in Leopard 10.5.2 is still not working with Adobe photoshop jpeg files either. They Still show up pixelated. Yes, I know the work around by going into photoshop/preferences/file handling/image previews: Never Save. Yea, sure that works, but that is something that not any Mac user should have to do. I have had more problems dealing with pictures on my Mac than my Pc by far. Anybody else? Solution? Better Operating System?
-
Tomcat virtual host configuration
Next stupid question from me again.
I'm trying to configure my Tomcat to handle several websites. Both websites are going to be JSP/JAVA driven.
Currently I'm struggling to figure out how to tell Tomcat to use application for Host by default.
I'm doing the following:
<Host name="gnum.info" appBase="D:\Users\Alex\web.gnum.info" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Alias>www.gnum.info</Alias>
<Context path="gnum.info" docBase="" debug="0" reloadable="true" cookies="true" />
</Host>
I triend different variations from having NO <Context> included to
1. <Context path="gnum.info" docBase="" debug="0" reloadable="true" cookies="true" />
2. <Context path="gnum.info" docBase="gnum.info" debug="0" reloadable="true" cookies="true" />
I'm always ending up with empty response for "www.gnum.info" (you can see it yourself).
Typing "www.gnum.info/gnum.info" gets back with what I want to see.
BUT
I'd like to see it typing "www.gnum.info" without "/gnum.info"...
Could anybody tell me how to achieve that?Hi Gnum,
Just change your context path to
<Context path="/" docBase="" debug="0" reloadable="true" cookies="true" />
note the "/" instead of "gnum.info"
Kevin -
Tomcat Virtual Host Configuration on windows 2000
Dear Reader,
I am using Tomcat 4.1 with JDK1.4. Currently i have 3 projects.
The navigation for these is ....
http://localhost:9090/Shopping/
http://localhost:9090/Bank/
http://localhost:9090/Sample/
Now,
I need these links as
http://Shopping:9090 or www.shopping.com is local system....
http://bank:9090 or www.bank.com is local system....
http://Sample:9090 or www.sample.com is local system....
I am using Windows OS. Please Help
Advance Thanks.
Rengaraj.RAlso should have mentioned that to get the mappings for the individual web apps (/Shopping, /bank and /Sample) after the localhost portion you need to add a context file for each web app to the tomcat configuration files (location below).
The files will live in /tomcat/Conf/Catalina/localhost/"the name of your web app". As an example something like:
<Context crossContext="true" docBase="/var/webapps/mybankapp" path="/bank" reloadable="true">
</Context>
This is placed in a file called: bank.xml
Edited by: PaulOckleford on Jun 29, 2009 4:14 AM
Edited by: PaulOckleford on Jun 30, 2009 2:26 AM Wrong xml file name -
Apache-weblogic bridge problems with virtual hosting
Hi,
Can we set apache-weblogic bridge where apache webserver is configured
as virtual hosts and each Virtual Host is mapped to a WebLogic server
instance running on separate port ?
Please provide doc or reference or your comments if you have solved this
problem
Thanks
ShriniwasThe above comments notwithstanding, there's one outstanding line in your post that seems crucial:
Also if I type on my browser the name of another secondary (or virtual) domain name in the form http://domain2.com it brings the website hosted under the primary domain which is domain1.com. In case I type http://www.domain2.com than it works as it should and displays the website hosted under this domain name.
As far as Apache is concerned, 'domain2.com' and 'www.domain2.com' are completely separate entities. They have to be otherwise if all domain2.com traffic went to this site you'd never be able to host different sites within the domain (e.g. blogs.domain2.com, wiki.domain2.com, blah.domain2.com, etc.). In other words, there is no automatic relationship between a hostname and sub-records of that hostname.
So what's happening here is Apache is seeing a request for 'domain2.com' which does not match any of its configured virtual hosts, so it handles the request via the default site. If you request www.domain2.com this matches your virtual host configuration so Apache serves the alternate content.
The fix is simple - trivial, even - you just need to tell Apache all the hostnames that match this site - in this case if you've configured the site's primary address as 'www.domain2.com' and you want it to also respond to requests to 'domain2.com' then add 'domain2.com' to the list of Server Aliases in Server Admin. -
Configuring default web apps for virtual hosts
Hi,
This posting is meant save time for anyone trying to specify a default web app
for each of their virtual hosts (as opposed to specifying a default web app for
each of their wl servers). This applies to weblogic 6.1, on NT. (I haven't tried
this on other platforms).
If you are trying to use the admin console to do this, give up. It's not possible.
The "Virtual Host/Configuration" window lets you specify everything about that
vhost configuration EXCEPT a default web app. (The "Default Web Application" drop
down menu will always have only one option to choose from: "none").
Instead, shutdown your server, and edit your domain's config.xml file manually.
Attached is an example config file that specifies that the web app "kz" should
be the default web app for the vhost "wl.kz.com", and that the web app "kahuna"
should be the default web app for the vhost "www.kahuna.com".
Hope this helps,
Brian O'Donnell
Lead Developer, Learning Network
[config.xml]Hi,
Is it possible to configure default web appls for virtual hosts
with Weblogic 6.0 on NT platform? I tried to configure the configure.xml as Brian
did, it doesnot work. I am just wondering if there's any other possible way to
do this.
Thanks.
Mei
"Brian O'Donnell" <[email protected]> wrote:
>
>
>
Hi,
This posting is meant save time for anyone trying to specify a default
web app
for each of their virtual hosts (as opposed to specifying a default web
app for
each of their wl servers). This applies to weblogic 6.1, on NT. (I haven't
tried
this on other platforms).
If you are trying to use the admin console to do this, give up. It's
not possible.
The "Virtual Host/Configuration" window lets you specify everything about
that
vhost configuration EXCEPT a default web app. (The "Default Web Application"
drop
down menu will always have only one option to choose from: "none").
Instead, shutdown your server, and edit your domain's config.xml file
manually.
Attached is an example config file that specifies that the web app "kz"
should
be the default web app for the vhost "wl.kz.com", and that the web app
"kahuna"
should be the default web app for the vhost "www.kahuna.com".
Hope this helps,
Brian O'Donnell
Lead Developer, Learning Network -
a quick Explaination of what I'm trying to do.
We have a DNS name, "our_intranet.com". This DNS points to a load balancer which routes the call to "our_weblogic_server:7015". When a request with this DNS comes in, we really want to go to our_weblogic_server:7015/portal/site/our_intranet. Can this be acheived using a Virtual Host? And if so, could give an example of creating a virtual host?
Thanks,
Tom.Thank you James for your reply,
I do appreciate you taking a moment to respond and include some suggestions. At this point I feel 90% certain that the answer lies within WebLogic configuration somewhere.
Discoverer is a J2EE application as I understand it and based on that belief it is probably using the standard J2EE servlet API calls such as ServletRequest. getScheme() (the protocol portion of the URL such as http, https, ftp), ServletRequest.getHostname(), and ServletRequest.getPort(). Those API calls return values derived by the server either from the connection itself or from server configuration.
The URL's being returned by the web application are not static either. Although the protocol and the port never change (always http://...:80/) the server hostname does. If I add an entry to my host file for fred.somewhere.com and then hit the server using that server name then the URL's returned by the web application are http://fred.somewhere.com:80/, and if I use barney.somewhere.com I get a similar result. Now, the web application could be reading the "Host" HTTP header out of the request itself to derive that information but why go through all that trouble when the Servlet API gives you a standard way to do it.
For this reason I believe Discoverer (the web app causing our grief) is getting this information from WebLogic even though I cannot verify that with absolute certainty. I wish someone from the Disco area could verify that. I have had a support request open with Oracle for over a week but so far they haven't been able to tell me where they get that information from (which I'm sure is just because I'm not speaking with a developer). I may actually in fact pass on this question to the Discoverer forums you suggested. If someone can at least tell me if Discoverer is getting this information from the application server then I can at least pass that along as confirmation to WebLogic folks.
I have set up an Apache web server as a reverse proxy server for http and https in front of this particular server as an experiment and get similar results with the server name. Whether I hit Apache via http or https I always get back http://servername:80/ from the back-end WLS. The fact is WebLogic isn't even running on port 80 which makes it even more interesting why the URL's we get back should point at 80 instead of the port WLS is listenning on. Since there is no port or protocol information contained within the HTTP request sent by client browsers (only the Host header which just has the hostname) that may have something to do with why the server doesn't know how to provide correct values, but that doesn't explain why it would choose to tell the web application port 80 instead of the port it is actually listening on.
As far as tracking down how to configure this beast it might be complicated by the fact that I don't think this is just WebLogic Server. This is Fusion Middleware. I didn't think that included Apache HTTP Server, but actually I can see there is a directory for Apache on the server identified as ohs (stands for Oracle HTTP Server). Some of the help in Enterprise Manager (or maybe it was in the WebLogic administration web console) actually talks about Oracle HTTP Server which they say is based on Apache HTTP Server and in fact the configuration files are consistent with Apache. That doesn't mean I don't believe WebLogic folks like yourself that say Apache is not a part of WebLogic server (which seems like a pure Java application) but maybe it is a part of Oracle Fusion Middleware. They might just have it there for other stuff working together with WLS (such as Oracle Web Cache) or for load balancing as you mentioned. If it is there then it might either complicate things, or might provide a possible solution. If it really is running there in front of WLS and we can use some Apache configuration values to override URL information that the server passes on to the web applications maybe it could help. I did see some processes running on the same server with a name something like HTTPD.worker. My Apps DBA's (who are also learning as they go with WLS) said they did zero Apache configuration as part of the install however and I know zero about how (or if) Apache is working together with WLS.
I tried going down the path of setting up a custom Network Channel and Virtual Host because a) it seemed like a logical place to look and b) I had seen some references to them on the web but as I tried to step through the configuration I admit I never saw any settings that related to protocol overrides. I have seen host and port overrides somewhere along the way but never a protocol override.
I'm confused that this seems so complicated. I mean, aren't there a lot of people out there running their servers behind a hardware load balancer with SSL termination at the load balancer (it handles the https decryption and then forwards the requests unencrypted to the back-end servers)?
Your link to the "Corecoreserverserverprotocolshttptitle.html" looks like just the right place (almost). If it only had Frontend Port and Frontend Protocol as well as Frontend Host (and instead of Frontend HTTP Port and Frontend HTTPS Port). So frustrating to be so close but miss. I do appreciate the pointer though.
Funny that you should bring up the post on WebLogic Wonders because that is actually the example I tried to follow when I attempted to set up a network channel and virtual host. I aborted before the deploy because the deploy wasn't working quite how I expected and I had little confidence it was going to help me at that point (because I hadn't been presented with any setting that allowed me to override the protocol (http/https) value for a front-end system. I'm still not quite sure how the Network Channel works together with the server/domain/virtual host so perhaps I need to do a little more reading.
If anyone understands exactly what I am trying to achieve though and can give me some direction it would be much appreciated. It seems straight forward to me:
We have an F5 hardware load-balancer that runs here:
https://external-servername:443/....
It uses hardware SSL accelleration to decrypt the incoming request and if it sees /discoverer/ in the URL it then forwards the request unencrypted to a back-end WLS here:
http://internal-servername:8888/...
We would be happy if any connection that server recieved it always overrides the scheme (https instead of http), server (external instead of internal...it actually does this properly already), and port (443 instead of 80). In a perfect world it might behave differently if we connect internally directly to the server (in other words if we don't access it through the load balancer then it provides URL information to continue accessing it directly) but that is just icing on the cake which probably would require virtual host configuration to differentiate the two. We'd be ecstatic if we could simply override those values all the time for the entire server to some constant values that we set.
Thanks,
Eric R. -
Following the book in chapter 2 I think Ivé followed everything correctly, but have encluded all the things I've edited below.
I was using wamp with no problems but after trying to set up a virtual host and now using xampp im abit lost its probabsomething stupid but I can find the prob.
(This post is abit long and dragged out so I used some colour to try ease the reading..)
When I try to view a dynamic page in live view or in firefox I get the following error:
**when using:
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>
result:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
thegoodlife
2009/10/13 12:47:48 PM
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
*when using:
<VirtualHost *:80>
DocumentRoot c:/htdocs
ServerName localhost
</VirtualHost>
result:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
thegoodlife
2009/10/13 12:32:58 PM
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
This is what I've done, blue indicating where I have or was meant to edit, red being the relivant context. (hope it helps )
1. Created a new folder called htdocs (C:\htdocs)
2. Changed the pathname to:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot "C:/htdocs"
and
# This should be changed to whatever you set DocumentRoot to.
<Directory "C:/htdocs">
3. Created vhosts folder; with a sub-folder called thegoodlife (C:\vhosts)
4. entered new vhost:
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 dwcs4
127.0.0.1 thegoodlife
127.0.0.1 bin.errorprotector.com ## added by CiD
5.It says uncomment the command by removing the #, (Supplemental configuation.), but this is the origional file; already uncommented?
# Real-time info on requests and configuration
Include "conf/extra/httpd-info.conf"
# Virtual hosts
Include "conf/extra/httpd-vhosts.conf"
# Distributed authoring and versioning (WebDAV)
Include "conf/extra/httpd-dav.conf"
6.Set the permissions and changed the code as instructed, unsing (c:/xampp/htdocs) as advised.
# You may use the command line option '-S' to verify your virtual host
# configuration.
<Directory C:/vhosts>
Order Deny,Allow
Allow from all
</Directory>
# Use name-based virtual hosting.
##NameVirtualHost *:80
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
<VirtualHost *:80>
DocumentRoot c:/xampp/htdocs
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/vhosts/dwcs4
ServerName dwcs4
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/vhosts/thegoodlife
ServerName thegoodlife
</VirtualHost>
Then creating the site definition:
local root forlder: C:\htdocs\thegoodlife\
testing server folder: C:\vhosts\thegoodlife\
URL prefix: http://thegoodlife/
hope i've covered all area's where I could have gone wrongJust one more thing - the description of what i did while first Kernel appeared:
Happened 2 days ago. Wasn't turning it off for like a day, only sleep mode by closing it. Worked fine all day, wasn't doing anything, except for checking mail 2-3 times and having windows 7 virtual machine opened but doing nothing, everything was going fine. Then closed it without turning off.
Opened 3-4 hours later, everything was working fine for 30 minutes of checking mail, then Kernel appeared. After that pretty much everything i did is described in part 1-5.
Note: all the time MBP was connected to internet via wifi, so updates to both MBP and virtual machine of all programs were possible.
I only shared downloads and desktop folders, so windows couldn't have access to system folder of Mac Os.
Hope this might help...Thanks again. -
Virtual hosts in apache defaults to first host
On my MacMini I have set up apache to use virtual hosts I and use a mounted USB drive to host the sites (in my case /Volumes/Work1/www as root). I have configured 3 sites and switch on the subdomain (in my case and in order in the virtual hosts file: hbc1.helsted.net, consulting.helsted.net, store.helsted.net).
On the MacMini I have inserted the urls in the hosts file to point at localhost for two of the entries and all work beautifully on the MacMini for those two. Anywhere else (and from the MacMini on the one not in the hosts file) the system defaults to the first entry in the virtual hosts config file (as the documentation says it will if the url is not recognized) which is displayed in the browser and which has entries in the log file.
After some time the server occasionally refuses to serve the pages and I get a 403 error (access denied). Again not on the MacMini with the hosts file entries. Looking at the error log from apache in that case it appear that it has got the full url served as it is in the log file.
Restarting the web share removes the 403 error (until next time).
Any hints on how to to resolve my two issues?Thanks for the reply, my vhosts config file contains the following (note that the viewer in the forum browser removes the initial #es on the comment lines):
# Virtual Hosts
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
# Please see the documentation at
# <URL:<a class="jive-link-external-small" href="http://">http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
# You may use the command line option '-S' to verify your virtual host
# configuration.
# Use name-based virtual hosting.
NameVirtualHost *:80
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Volumes/Work1/www/hbc1"
ServerName hbc1.helsted.net
ErrorLog "/private/var/log/apache2/hbc1.helsted.net-error_log"
CustomLog "/private/var/log/apache2/hbc1.helsted.net-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Volumes/Work1/www/consulting"
ServerName consulting.helsted.net
ErrorLog "/private/var/log/apache2/consulting.helsted.net-error_log"
CustomLog "/private/var/log/apache2/consulting.helsted.net-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Volumes/Work1/www/store"
ServerName store.helsted.net
ErrorLog "/private/var/log/apache2/store.helsted.net-error_log"
CustomLog "/private/var/log/apache2/store.helsted.net-access_log" common
</VirtualHost>
<Directory /Volumes/Work1/www>
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Message was edited by: skhelsted -
Virtual Hosts in Apache HTTP Server
How to configure virtual hosts in Apache HTTP Server httpd.conf file.
If I want to access my server with some other name(alias), how can I do this ?
Suggestions in this matter would be highly helpful.
Thanks
Vidhyut AroraFollowing is a note explaining how to setup
Virtual hosts.
Hope this helps
Ranga
Note:70647.1
Subject: Apache Server Virtual Hosting
Last Revision Date: 07-JUN-2001
PURPOSE
This document discusses considerations for setting up virtual hosts on an
Apache machine, to include how to get the hostname working and how to
configure Apache.
SCOPE & APPLICATION
The information in this document is intended for those who manage multiple sites
using an Apache machine.
REFERENCES
First published in Apache Week issue 31 (6th September 1996)
Last update 20th September 1998
Using Virtual Hosts
Virtual Hosts let you run multiple independent Web sites on a single host with
a single Apache setup.
One of the most important facilities in Apache is its ability to run virtual
hosts. This is now the essential way to run multiple Web services - each with
different host names and URLs - that appear to be completely separate sites.
This is widely used by ISPs, hosting sites and content providers who need to
manage multiple sites but do not want to buy a new machine for each one.
Picking an IP address
There are two types of virtual hosts: IP-based and non-IP-based. The former is
where each virtual host has its own IP address. You must have a new IP address
for each virtual host you want to set up, either from your existing allocation
or by obtaining more from your service provider. When you have extra IP
addresses, you tell your machine to handle them. On some operating systems, you
can give a single ethernet interface multiple addresses (typically with an
fconfig alias command). On other systems, you must have a different
physical interface for each IP address (typically by buying extra ethernet
cards).
IP addresses are a resource that costs money and are increasingly difficult to
get, so modern browsers can now also use 'non-IP' virtual hosts. This
lets you use the same IP address for multiple host names. When the server
receives an incoming Web connection, it does not know the hostname that was used
in the URL. However, the new HTTP/1.1 specification adds a facility where the
browser must tell the server the hostname it is using, on the Host: header. If
an older browser connects to a non-IP virtual host, it does not send the Host:
header, so the server must respond with a list of possible virtual
hosts. Apache provides some help for configuring a site for both old and new
browsers.
Picking a Hostname and Updating the DNS
Having selected an IP address, the next stage is to update the DNS so that
browsers can convert the hostname into the right address. The DNS is the system
that every machine connected to the internet uses to find the IP address of host
names. If your hostname is not in the DNS, no one can connect to
your server (except by the unfriendly IP address).
If the virtual hostname you are going to use is under your existing domain,
you can just add the record into your own DNS server. If the virtual hostname
is in someone else's domain, you must get them to add it to their DNS
server files. In some cases, you want to use a domain not yet used on the
internet, in which case you must apply for the domain name from the
InterNIC and set up the primary and secondary DNS servers for it, before adding
the entry for your virtual host.
In any of these cases, the entry you need to add to the DNS is an address record
(an A record) pointing to the appropriate IP address. For example, say you want
the domain www.my-dom.com to access your host with IP address 10.1.2.3: you
must add the following line to the DNS zone file for my-dom.com:
www A 10.1.2.3
Now, users can enter http://www.my-dom.com/ as a URL in their browsers and get
to your Web server. However, it will return the same information as if the
machine's original hostname had been used. So, the final stage is to tell Apache
how to respond differently to the different addresses.
How Apache Handles Virtual Hosts
Configuring Apache for virtual hosts is a two-stage process. First, it needs
to be told which IP addresses (and ports) to listen to for incoming Web
connections. By default, Apache listens to port 80 on all IP addresses of the
local machine, and this is often sufficient. If you have a more complex
requirement, such as listening on various port numbers, or only to specific IP
addresses, then the BindAddress or Listen directives can be used.
Second, having accepted an incoming Web connection, the server must be
configured to handle the request differently, depending on what virtual host it
was addressed to. This usually involves configuring Apache to use a different
DocumentRoot.
Telling Apache Which Addresses to Listen To
If you are happy for Apache to listen to all local IP addresses on the port
specified by the Port directive, you can skip this section. However, there are
some cases where you want to use the directives explained here:
- If you have many IP addresses on the machine but only want to run a Web
server on some of them
- If one or more of your virtual hosts is on a different port
- If you want to run multiple copies of the Apache server serving different virtual
hosts
There are two ways of telling Apache what addresses and ports to listen to:
- Use the BindAddress directive to specify a single address or port
- Use the Listen directive to any number of specific addresses or ports
For example, if you run your main server on IP address 10.1.2.3 port 80, and a
virtual host on IP 10.1.2.4 port 8000, you would use:
Listen 10.1.2.3:80
Listen 10.1.2.4:8000
Listen and BindAddress are documented on the Apache site.
Configuring the Virtual Hosts
Having gotten Apache to listen to the appropriate IP addresses and ports, the
final stage is to configure the server to behave differently for requests on
each of the different addresses. This is done using <VirtualHost> sections in
the configuration files, normally in httpd.conf.
A typical (but minimal) virtual host configuration looks like this:
<VirtualHost 10.1.2.3>
DocumentRoot /www/vhost1
ServerName www.my-dom.com
</VirtualHost>
This should be placed in the httpd.conf file. You replace the text
10.1.2.3 with one of your virtual host IP addresses. If you want to specify a
port as well, follow the IP address with a colon and the port number
(example: 10.1.2.4:8000). If omitted, the port defaults to 80.
If no <VirtualHost> sections are given in the configuration files, Apache
treats requests from the different addresses and ports identically. In terms of
setting up virtual hosts, we call the default behavior the main server
configuration. Unless overridden by <VirtualHost> sections, the main server
behaviour is inherited by all the virtual hosts. When configuring virtual
hosts, you must decide what changes to make in each of the virtual
host configurations.
Any directives inside a <VirtualHost> section apply to just that virtual host.
The directives either override the configuration give in the main server, or
supplement it, depending on the directive. For example, the DocumentRoot
directive in a <VirtualHost> section overrides the main server's DocumentRoot,
while AddType supplements the main server's mime types.
Now, when a request arrives, Apache uses the IP address and port it arrived on
to find a matching virtual host configuration. If no virtual host matches the
address and port, it is handled by the main server configuration. If it does
match a virtual host address, Apache uses the configuration of that virtual
server to handle the request.
For the example above, the server configuration used is the same as the
main server, except that the DocumentRoot is /www/vhost1, and the
ServerName is www.my-dom.com. Directives commonly set in <VirtualHost>
sections are DocumentRoot, ServerName, ErrorLog and TransferLog. Directives
that deal with handling requests and resources are valid inside <VirtualHost>
sections. However, some directives are not valid inside <VirtualHost> sections,
including BindAddress, StartSevers, Listen, Group and User.
You can have as many <VirtualHost> sections as you want. You can
leave one or more of your virtual hosts being handled by the main server, or
have a <VirtualHost> for every available address and port, and leave the main
server with no requests to handle.
VirtualHost sections for non-IP Virtual Hosts
Non-IP virtual hosts are configured in a very similar way. The IP address that
the requests arrive on is given in the <VirtualHost> directive, and the
host name is put in the ServerName directive. The difference is that there
(usually) is more than one <VirtualHost> section handling the same IP address.
For Apache to know whether a request arriving on a particular IP
address is supposed to be a name-based requests, the NameVirtualHost directive
addresses for name-based requests. A virtual host can handle more than one
non-IP hostname by using the ServerAlias directive, in addition to the
ServerName.
null -
Hi ,
R12.1.3 & 11gR2 DB
I have a qucik question . When We have Virtual Host Name for setting , What Should be the node name for ICM in Concurrent Manager Admin form.
In One of our Instance : For ICM & Other Manager , its Virtual Host Name
For Other : ICM : Physical Host Name & Other Manager Virtual Host Name .
Which is good. We having a issue with ICM on both Nodes , in every minutes is going down and come up automatically.
Regards
Sourabh GuptaHi Hussein,
Thanks a lot. I have already review these document.
Is Auto Failover With Virtual Hostnames For Concurrent Processing Servers Supported In 11i Or R12? (Doc ID 456540.1)
Adding an Alias Hostname with Oracle E-Business Suite Release 12 (Doc ID 603883.1)
Concurrent Processing - CONC-SM TNS FAIL In Internal Concurrent Manager (ICM) Log File With Virtual Hosts Configuration [ID 961216.1]
ICM Not Starting: Node Name not Registered [ID 602942.1]
I am curious what should be the node name in concurrent manager Administrator form.
W ether is should be the virtual host name or physical host name.
I have just checked with few people , Some Says ICM node name should be Physical server name & Other CM name can be Virtual name. I am not sure on what basis people are saying.
Few says node name should be the physical host for every CM.
Note Sure what is correct & best configuration.
Regards
Sourabh GUpta -
Real brain bender: virtual host or omni portlet issue? Take the challenge
We are having problems with a portal page that displays several omni portlets on several tabs. Here's the situation:
The page consists of 5 tabs, each representing a different demographic characteristic. On each tab there are four omni portlets. One omni porlet represents a selection list. The user makes a selection, which triggers an omni portlet event to pass the selection criteria to a page parameter. The other three omni portlets on the tab read the parameter value and retrieve data according to the selected parameter value.
Example: The user selects the Age tab and selects the link representing data for the Central Region. The omni portlet's event populates the page's "region" parameter with the value "Central." The other three portlets on the tab retrieve their respective data where region = 'Central'.
Since all the tabs on the page represent different demographic characteristics, the omni portlets on all the other tabs also perform their queries where region='Central' so that the user will see Central Region data displayed regardless of what tab they navigate to.
Also, when the user navigates to another tab and selects a different region, all the omni portlets on all the tabs perform their respective queries to capture data where region=<selected region>.
The page performs correctly until we configure a virtual host. In that case, when a user makes a selection of a particular county in one tab, the queries are performed but the page displays with a tab in view other than the one where the user made the selection.
Example: the user navigates to the Age tab and selects region='Central'. Then the user navigates to Gender tab and then Living Situation tab, viewing the results on each tab. Now the user returns to Gender tab and selects region='Western.' The portlets perform their queries and the page re-displays with the user on Living Situations tab, rather than Gender tab where the selection was made.
Obviously, we want the user to stay put on the tab in which they make their selection. I think it's a problem with the virtual host configuration. My DBA thinks it's a problem with the way the page is built. Has anyone else run into this kind of thing? Is there a trick to using Virtual Hosts?Your main.cf seems redundant.
For example:
if you specify:
virtual_alias_maps = hash:/etc/postfix/virtual_alias, mysql:/etc/postfix/mysql_virtual_forwards.cf
you don't need this:
alias_maps = hash:/etc/postfix/aliases
and i think you have a lot of more options you don't need.
This is my main.cf on my vps and everything works great (sending and receiving emails from/to most common mail server: gmail, hotmail etc etc)
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
message_size_limit = 4194304
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
it is very simple (no dkim, no forced tls, no mailbox limits and so on) and it can be improved but it works..
as I suggested you just try spending some hour wiping postfix installation and giving a look to this guide
Maybe you are looking for
-
Analog Source Triggering with more than one channel in channel list
Hello, I am trying to use an analog reference trigger with a channel list that contains more than one entry using a M Series 6289. I am aware that this is generally not possible to have more than one channel in the list due to hardware limitations. I
-
Hello All, We need to configure the VAR report for switzerland to satify the legal reporting on foreign trade.( SAP provides this through VE21 and VE22). Can anyone help us with the basic configuration requirements? In the standard report, there are
-
PC Suite 6.83 rel 141 released today!
It's true. I have no idea what's changed/fixed but I hope that the Vista compatibility is improved... At least installer has changed and it looks quite cool but the PC Suite itself hasn't changed visually expect the fact that it now supports Vista Ae
-
Flash Wont Display and other bugs
As far as the flash thing is concerned i am going to try installing flash 7/8 as i believe that flash 9 does'nt work with the latest safari. However i also have another problem, on the same page that the flash objects don't display there are small di
-
Datafile containing rollback segment crashed
Hi, In one of our production box (oracle 8.1.7.4 and HP UX), datafile containing rollback segment crashed. To open the database, i commented rollback segment line in init file and started the db and brought the crashed datafile to offline for droppin