Setup virtual host problem
I would like to set two virtual hosts on one server. According to the apache's document, I have done the following in Apach httpd.conf. Howerver, I don't why it does not work. Does anyone can help me?
nameVirtualHost 10.1.1.1
<VirtualHost 10.1.1.1>
ServerName devserver
DocumentRoot "c:\dev"
</VirtualHost>
<VirtualHost 10.1.1.1>
ServerName testserver
DocumentRoot"c:\test"
</VirtualHost>
I would like to set two virtual hosts on one server.
According to the apache's document, I have done the
following in Apach httpd.conf. Howerver, I don't why
it does not work. Does anyone can help me?
nameVirtualHost 10.1.1.1
<VirtualHost 10.1.1.1>
ServerName devserver
DocumentRoot "c:\dev"
</VirtualHost>
<VirtualHost 10.1.1.1>
ServerName testserver
DocumentRoot"c:\test"
</VirtualHost>Hi,
Have you tried something like this:
nameVirtualHost 10.1.1.1
<VirtualHost devserver>
ServerName devserver
DocumentRoot "c:\dev"
</VirtualHost>
<VirtualHost testserver>
ServerName testserver
DocumentRoot"c:\test"
</VirtualHost>
Jim
Similar Messages
-
How to properly setup virtual hosts on leopard server
I am not just new to leopard server but new to “server” as a whole. I have bought a 10-client leopard server and installed it on my old macbook couple of days ago because of the gui and seemingly ease-of-setup of a leopard server. I have watched and followed a tutorial on Lynda.com to install my server. Unfortunately, that tutorial focuses mainly on running a single web server. My main purpose of setting up the leopard server is to run multiple virtual hosts. Now my server (which has its own public ip address and I shall refer to it as just IP) is up and running but I seem not to be able to get virtual hostings to work properly. Below is a summary of what I have setup and I hope somebody from the community can take a look and point out what I have done wrong (thanks in advance):
- server setup as advanced
- dns settings:
o I am not sure whether a different zones should be setup for each domain, so I have opted to define 1 primary zone only and then define the other domain as a machine. For simplicity sake, I have only used two domains in the example below. I actually need to setup at least half a dozen.
o primary zone
• my1stdomain.com. is the primary zone name
• ns.my1stdomain.com. is the only nameserver
• mail.my1stdomain.com. is the only mail exchanger
• www.my1stdomain.com. as machine and IP as value
• www.my2nddomain.com. as machine and IP as value
• mail.my1stdomain.com. as machine and IP as value
• server.my1stdomain.com. as machine and IP as value
• ns.my1stdomain.com. as machine and IP as value
o reverse zone
• ip reverse mapping ns.my1stdomain.com.
- web settings:
o sites:
• I have defined the following 2 sites and point each of them to a different folder:
• my1stdomain.com
• my2nddomain.com
- I have setup dns at my domain registrar to reference ns.my1stdomain.com for both my1stdomain.com and my2nddomain.com,
I have no problem accessing www.my1stdomain.com but I couldn’t reach www.my2nddomain.com. and I have a hunch it has to do with my dns settings.It sounds like there are two compounding errors here.
• www.my1stdomain.com. as machine and IP as value
• www.my2nddomain.com. as machine and IP as value
By definition, www.my2nddomain.com cannot be a record in my1stdomain.com's zone.
You MUST have one zone for my1stdomain.com (that contains my1stdomain.com's NS, MX, mail, www etc. records) and a SECOND, separate zone for my2nddomain.com that contain's its records.
Now the records in my2nddomain.com's zone may contain the same data (e.g. the same A record), or even reference my1stdomain.com (e.g. 'www.my2nddomain.com is a CNAME to www.my1stdomain.com), but they are separate zones.
Secondly.
I have defined the following 2 sites and point each of them to a different folder:
• my1stdomain.com
• my2nddomain.com
If you want to access the site via 'www.my1stdomain.com' (or 'www.my2nddomain.com') then your site needs to be setup for www.my1stdomain.com, not my1stdomain.com
As far as the web server is concerned, 'my1stdomain.com' is a completely different address (and therefore a different site) from 'www.my1stdomain.com. While most poeple set them to the same it is entirely appropriate and valid for them to be two different sites as far as the web server is concerned.
Therefore you need to change your sites' configuration to reference the 'www' version of its hostname.
If you want to run both 'my1stdomain.com' and 'www.my1stdomain.com' as the same site then add the other hostname under Aliases (this tells Apache what hostnames should map to this virtual host).
Try fixing those two elements and try again.
Finally, it's often far easier for others to debug this kind of problem when you talk in real names, not dummy ones. Telling us what the domains in question are, for example, would allow others to query DNS to see what values you're actually publishing, and would go a long way to answering the question for sure, as opposed to just speculation. -
I have an interesting problem. Running CF 7.02
standard on Windows using Apache 2.2 as the web server. I have
multiple name virtual hosts set up on this server. Let's say I have
two sites A and B. A user requests
http://A/default.cfm. They get
http://B/default.cfm but the images
are missing since the server is looking for B/default.cfm's images
in A. This seems to occur on all sites where there is a request to
a page with the same relative path to the webroot as another site
like webroot/default.cfm and a couple of other generic functions
duplicated between sites. Also, thankfully, this behavior does not
occur on what I consider the primary site running CF code or other
virtual sites that have no CF.
The CFIDE mapping in the CF Administrator was established in
the webroot of this primary CF site. From reviewing the access logs
for the different sites, it appears that there is an http request
made followed by access to the CFIDE directory. Since this is
mapped within the webroot of the primary website, it seems like it
is accessing this sites default.cfm instead of the one from the
correct virtual site. The images for this page are missing because
it is looking for the files in the correct virtual site.
The CFIDE mapping for CF MX Standard is set up on
installation and is not configurable through the Administrator so I
have not tried to change this to a different location. Has anyone
else seen a problem like this?
BrianIn the administrator in Caching, make sure Cache web server
paths is unchecked. If it is selected, uncheck it and restart CF.
You can also set this in jrun.xml under the
jrun.servlet.jrpp.JRunProxyService by adding:
<!-- set this to false for multi-hosted sites -->
<attribute
name="cacheRealPath">false</attribute> -
Virtual Hosting Problem - SMTP error, POP is fine
Hi all,
I set up my server with this domain: brandingforces.com
Additionally I did managed it to get 9 other domains running.
Everything is working fine, even webmail and POP.
However, on the virtual hosted domain steinberginc.com, I do get this error:
Cannot send message using the server mail.steinberginc.com
Use the pop-up menu below to try a different outgoing mail server. All messages will use this server until you quit Mail or change your network settings.
I am not sure where the problem might be since other domains are sending fine SMTP.
I did set up all domains in SA-mail-hosting-virtual domains...... I listed them without the WWW.
Each domain has one IP for the nameserver and 1 IP as the mailserver (in machine field)
Can someone help me?my fault. old email settings on mail were still configured on port 26 instead of 25. What were the old settings from the other server.
-
Virtual Host Problem !!!!!
I have few virtual host on a Iplanet Web server 6.0 SP2 , One of the application / virtual host has stopped running, giving error "page cannot be displayed", HTTP/1.1" 500 335.
I checked the logs as well but the error logs is also not getting any error message.
I am also now not able to run a simple HTML file on this virtual host.
I have other virtual hosts on the same server instance and they are running absolutely fine.
Has anyone faced this kind of problem?
URGENT !!!!!!!!bzoler wrote:
I have configured a virtual hos t on my weblogic 7 server
but it doesn't work
are there some special thing to do
to make it work?Could you please be more specific about what you mean by "doesn't work"?
Try posting WLS questions to weblogic.developer.interest.servlet or
weblogic.developer.interest.webserver newsgroups.
Subbu -
Virtual hosting in Weblogic 6.0
hi,
I have created a virtual host with the name MyVirtualHost and VirtualHost names
as mysite , in wl6.0 using the admin console.
I have cofigured DefaultWebApp_myserver as the default web application.I checked
the config.xml file and an entry has been made in it <VirtualHost
DefaultWebApp="DefaultWebApp_myserver"
Name="MyVirtual Host"
PostTimeoutSecs="20"
Targets="myserver"
VirtualHostNames="mysite"
/>
How do I access it?
I tried http://mysite and http://mysite:7001 but I get the default "page cannot
be displayed " page with IE.
Any Help?
Thanx
SunilNot quite sure what the question is, but the answer most likely rests in wl 6.0 docs under "virtual
hosting".
Gene
"Virendar Rana" <[email protected]> wrote in message news:3a7202b7$[email protected]..
> I have multiple high-level DNS domain for which I want to setup Virtual Hosting in a single
Weblogic Server 6.0?
-
Oracle Portal Virtual Host Enhacement for Multiple Virtual Hosts
I open the TAR Number: 4326752.996
The TAR is related to " REQUEST ASSISTANCE FOR MULTIPLE VIRTUAL HOSTS AND MULTIPLE PAGE GROUPS CONFIG. "
This is the Scenario: We Have Oracle Portal installed in a single Box. yes I know I know... but Not everybody is Yahoo or Google for Clusters and all the good stuff, we just want our website managed by Oracle Portal since all our ERP is running Oracle Database. Anyway. 1 Box running Oracle Portal Infrastructure and MidTier.
It turns out that our previous configuration we have the LAMP Solution with PHP, Apache with Virtual Servers configuration very trivial for a regular web server however we have about 6 Virtual domains.
For example:
www.abc.com
www.def.com
www.ghi.com
www.jkl.com
www.mno.com
www.pqr.com
We also like to post all our Intranet Information in this great Portal:
http://intranet.com
Where intranet.com is the same server but setup in our Internal DNS without be a Real Internet Register Domain.
So bottom line we start doing great with Install our single box install, later [GRRRRRR does not come by default in port 80 GRRRRRR, ok need to move and setup the virtual host to resolve our main External website www.abc.com ]
For starters ok it worked we have our main website running Oracle Portal.
Now is time to go to the step number 2.
Setup another Page Group in Portal to be the Page_Group_INTERNAL.
I figure if Apache can setup Virtual Hosts pointing to Independent parts of the File System without be shared. I was expecting some kind of custom configuration where I can setup httpd.conf to point to some specific PageGroups to make sure
www.abc.com => Page_Group_External
never share information with:
intranet.com => Page_Gorup_Internal
My TAR was very quick closed with the Argument that is not what It supposed to do.
Since a virtual host is a common thing to do on Linux and Apache, I wonder if You guys could list this as one of the default features to have multiple virtual domains assosiated with Page Groups that they never talk or share Resources I think that would be really great.
In the mean time I guess we have no option but to put a password for every internal page or take the risk of share our Information to the Internet. Perhaps designate another box with Oracle Portal but In that case Is not really cost/bennefit to use a killer technology for our external site since we just have no more than 30 pages.
Anyway just figure drop you guys a note any advise will be really appreciated.
Best Regards Dino.Hi Martin,
1. To change the target URL of KM resources you can to the following:
Access the URL Generation Service Configuration by navigating to:
System Administration -> System Configuration -> Knowledge Management -> Configuration
Content Management -> Global Services -> URL Generator Service
Change the Host property to "portal.company.com".
2. You change the Port by opening the Visual Administrator and going to : Dispatcher -> Services -> HTTP Provider
Change there the "Ports" entry from (Port:50000,Type:http)to (Port:80,Type:http). Then go on "Save".
3. To remove the "/irj" from the portal URL you can create a index.jsp with the following content, and save it in the J2EE Documentation folder:
<Drive>:\usr\sap\<SAPSID>\JC<J2EE_instance_number>\j2ee\cluster\server0\apps\sap.com\com.sap.engine.docs.examples\servlet_jsp\_default\root
<%
//Send the redirect using server redirection (not client script)
//This will also send the HTTP GET parameters
String queryString = request.getQueryString() ;
if (queryString==null ) {
response.sendRedirect
("irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default") ;
} else {//redirect with HTTP GET parameters
response.sendRedirect
("irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default?" + queryString) ;
%>
Hope this helps,
Robert -
Virtual Hosts - I'm lost!
I've been pulling my hair out trying to figure out how to get MySQL, phpMyAdmin and virtual hosts set up on my MacBook Pro. I finally paid a computer science student $100 to do it for me, and he botched it, so I'm now going back to square one.
My websites are located in /Users/username/sites/. I've modified the httpd.conf, hosts and NetInfo files, and I can now preview the home page of ONE of my virtual host sites. The problem is that I see the page whether I type http://localhost/, http://Geobop/, http://GW/ or http://GS/ into my browser. It should preview only at http://Geobop/.
I rediscovered the article Enabling Virtual Hosts on MacOS X at http://www.evolt.org/article/EnablingVirtual_Hosts_on_MacOSX/18/13138/
and added a script to my httpd.conf file, as follows:
# Leave this one alone - it makes sure that localhost works.
<VirtualHost 127.0.0.1>
DocumentRoot /Library/WebServer/Documents
ServerName localhost
</VirtualHost>
#<VirtualHost 127.0.0.1:80>
# ServerName geobop
# ServerAdmin [email protected]
# DocumentRoot /Users/MYNAME/Sites/Geobop
#</VirtualHost>
If I understand correctly, this is supposed to make http://localhost/ display something unique, rather than a local website. However, all the URL's I cited above still display the same thing...but this time around they display blank pages with columns of numerals along the left margin.
In an earlier experiment, I deleted all my virtual hosts from httpd.conf. Then all these URL's displayed the following:
Index of /
Name Last modified Size Description
[DIR] Parent Directory 13-Mar-2007 15:49 -
[ ] index.php 06-Oct-2006 15:36 1k
[ ] php5.fcgi 06-Oct-2006 18:18 1k
[ ] phpMyAdmin-2.9.0.2.tar 06-Oct-2006 17:44 11.4M
[ ] phpinfo.php 06-Oct-2006 15:20 1k
[ ] phpinfo.php5 06-Oct-2006 18:20 1k
Apache/1.3.33 Server at localhost Port 80
Can someone tell me what's going on and how to fix it? If I can get Apache and my virtual hosts squared away, then I'm going to try to get MySQL and phpMyAdmin back up and running.
Thanks.I don't know much about it, but I do have two comments since it does not sound like a virtual hosts problem.
1) Netinfo Machines will not work by default. You will need to configure lookupd to give Netinfo priority over DNS:
lookupd -configuration
The default configuration will be:
LookupOrder: Cache FF DNS NI DS
configname: Host Configuration
What you need to do is configure lookupd to give NI priority over DNS. Here is how it should look:
LookupOrder: Cache NI FF DNS DS
To do this, use commands like this, you will need to have root access enabled:
su
lookupd -configuration
cd /etc
sudo mkdir lookupd
cd lookupd
echo LookupOrder Cache NI FF DNS DS > hosts
reboot
lookupd -configuration
After rebooting, your lookupd order should put NI in front of DNS. Now you can make entries in the "machines" column to your local domains.
2) MySQL is not installed, however a socket is configured so yeah it's a little confusing. You have to go to the website http://dev.mysql.com/downloads/mysql/5.0.html and scroll down to OSX. Just ignore the pesky questionnaire screen before the download page. -
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 -
Setting up Virtual Host in Apache for UCM Sites
As the subject says: I am trying to setup virtual hosts in apache for UCM Sites. Now we are trying to set it up so for every site in UCM we have one ip address. So on the browser when I see someone typed in "http://www.myfirstsite.com" (through the magic of dns they get routed to my server). Once they are at the server in Apache I want to setup virtual hosts so I can redirect user to the proper site residing in UCM.
Now, it is possible for me to access the sites by doing this "http://myservername/myfirstsite". But what I want to setup in Apache is that when someone types in "http://www.myfirstsite.com" they see which ever site I want them to see in UCM. But mann I just don't know what would be the document root or how would I go about getting the users to SEE what I want them to see. Can anyone help me with this please? Thanks in advance.You should be able to stick with the default apache config where it will answer for any hostname and create virtual hosts for each instance with the document root appropriate for that CS instance. Then you should be able use rewrite rules to direct users to the appropriate virtual host depending on what URL they access the server with. Check out the documentation for Apache around mod_rewrite: http://httpd.apache.org/docs/current/rewrite/
-
I have a web application running and accessible through url:
http://internal.server.com:7777/admin/faces/pages/pwd.jspx
Now, i'd like to access it through a gateway (OHS) through URL:
http://mycompany.com/admin/faces/pages/pwd.jspx
so, i setup virtual host:
<VirtualHost *:443>
#Public URLs only
ServerName mycompany.com
ProxyRequests Off
ProxyPreserveHost On
<Location /admin/faces/pages/pwd.jspx>
ProxyPass http://internal.server.com:7777/admin/faces/pages/pwd.jspx
ProxyPassReverse http://internal.server.com:7777/admin/faces/pages/pwd.jspx
</Location>
</VirtualHost>However, i'm not able to get it work since i got 404 page not found when I access http://mycompany.com/admin/faces/pages/pwd.jspx. the log shows it seems trying to access a local file instead of we application:
File does not exist: /instance/CommonDomain_webtier/config/OHS/ohs1/htdocs/admin
Is there anything I'm missing.
Thankshi Aacc,
Open your hosts file windows location: C:\WINDOWS\system32\drivers\etc\hosts and linux location:/etc/hosts
You need admin/root rights to make changes in this file
172.30.0.12 mycompany.com mycompany
before making any changes take a back up of the file httpd.conf
Since i can see you tryin to hit the url,
http://mycompany.com/admin/faces/pages/pwd.jspx
you need default port 80
Open httpd.conf file
Change Port to 80
Listen <your ip-address>:80
NameVirtualHost *
<VirtualHost *:80>
ServerName mycompany.com
</VirtualHost>
After this Bounce the OHS,Also check whether port 80 is open in your machine and even no other application is listening to port 80
Lookin at your default port number,I guess ur using OAS10g,if yes then below link will help you more
http://avdeo.com/2008/04/22/configuring-virtual-host-oracle-as10g/
Regards
Fabian -
Problem with DNS and/or Virtual Host (works from inside, not from outside)
I am running several web sites (as virtual hosts) successfully on one Xserve (192.168.200), which are accessible internally and from the Internet (via forwarding port 80 on our firewall).
Now I am trying to add another web site (newmini.domain.com), which however is running on a Mac mini (also on the same subnet as the Xserve) at 192.168.100. What I did is make an additional entry under the Xserve's DNS for the domain (domain.com) (+ Machine..., pointing to 192.168.0.100). (I also made the necessary changes to the Mac mini's httpd and hosts configuration--no problem there).
Now, here's the strange thing: All computers on the subnet, whose DNS points to the Xserve, can see and browse newmini.domain.com fine. No problem. The computers ask the Xserve for the IP of the host in question, the Xserve says, "192.168.100", the request goes to the Mac mini, and it serves the web site as expected.
But this doesn't happen if the request comes from the Internet. Instead of seeing the Mac mini, the client sees the default web site of the Xserve... So it appears that somewhere, the virtual host part of the HTTP request is lost between our firewall and the Xserve.
Any ideas? Thanks.It's not going to.
You say you've setup port forwarding on the firewall. Port forwarding only cares about the port number (80). It knows nothing about the nature of the request (e.g. the hostname that the web request is for). Therefore all extenal connections on port 80 get sent to the XServe. The newmini doesn't see the traffic at all.
If you only have a single public IP address you can only forward port 80 traffic to a single machine. Your options are to either use a different port number, or configure the XServe to proxy the connection to the mini (so now the traffic goes router -> XServe -> Mini -> XServe -> router), although that might not do what you want since it still places load and dependencies on the XServe. -
Virtual Host & NetStorage Problem
Good Morning,
I recently moved my NetStorage server over to SLES 10.2 w/OES2sp1.
The Basic NetStorage Service has been configured and is working, however these are the issues that still remain after many changes to configurations (mostly Apache2):
Virtual Hosts: I like to have my servers that use Virtual Hosts setup that if you browse to the internal server name (i.e. servername.domain.local) I get the Novell Welcome Screen, and when I browse to NetStorage (i.e. NetStorage.domain.org) I have a redirect setup to: netstorage.domain.org/NetStorage and it takes me to the NS Login page.
I can get one or the other working, but not both. This used to work fine on NetWare.
NetStorage w/Internet Explorer: When IE 6 is used to access NetStorage (after moving onto Linux), instead of getting a prompt to accept the certificate, I see the certificate text on the right side of the NetStorage home page and I can not login. With IE 7, I get prompted to accept the certificate, but I still get the text and can not login.
With Firefox, it works fine.
Any insight is welcome,
Thank you,
TonyOriginally Posted by afiore
Good Morning,
I recently moved my NetStorage server over to SLES 10.2 w/OES2sp1.
The Basic NetStorage Service has been configured and is working, however these are the issues that still remain after many changes to configurations (mostly Apache2):
Virtual Hosts: I like to have my servers that use Virtual Hosts setup that if you browse to the internal server name (i.e. servername.domain.local) I get the Novell Welcome Screen, and when I browse to NetStorage (i.e. NetStorage.domain.org) I have a redirect setup to: netstorage.domain.org/NetStorage and it takes me to the NS Login page.
I can get one or the other working, but not both. This used to work fine on NetWare.
NetStorage w/Internet Explorer: When IE 6 is used to access NetStorage (after moving onto Linux), instead of getting a prompt to accept the certificate, I see the certificate text on the right side of the NetStorage home page and I can not login. With IE 7, I get prompted to accept the certificate, but I still get the text and can not login.
With Firefox, it works fine.
Any insight is welcome,
Thank you,
Tony
I am having the same problem. Did you ever find a solution to this? -
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.
Maybe you are looking for
-
Help with photos in project???!!
Hello, I just bought an iMac about a month ago so that I could edit home movies and create DVD's of family vacations/events to share with my family. I have done this in the past on the PC with Pinnacle Movie Studio Software but it was buggy and more
-
Display BLOB Image in a JSP page.
Hi, Is there any easy way to display a Image in the browser using a JSP and an Oracle BLOB. I would like any code examples that anyone can provide me. I would like as many ways to do this as possible. Thanks Brian
-
StreamTokenizer NVAL bug? 16 digits not reading correctly?
hi all! i do some calculations which are highly precise, and we use numbers with 16 digits after the comma. this works most of the time without problems. but for some numbers java rounds it automatically. i think the problem is within the StreamToken
-
Scrap cost generated is more than the raw material cost
Dear Gurus. Please help me in this scenario The conversion cost of the material is lesser than the scrap cost when the material is sent to vendor for any grinding operation, in such cases we need to recover money from vendor. Eg: Conversion cost is
-
"CachedAnonymousMethodDelegate" and exception
In our deployed application(in AFS), a call to a member function from another member function in the same class is failing with an exception "absolute path information is required". My locally build application is working fine. Our application is con