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

Similar Messages

  • 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 Arora

    Following 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/

  • Question about Virtual Hosts with Apache 2

    Hi,
    I have a mac mini with 10.5.4 and I was wondering if it is possible to host two websites on this one computer. What I mean by this is I have an ip address 12.34.56.78 that points to the mac mini.
    I also have two domain names, say example1.com and example2.com, each with total DNS control. Is it possible to point both domains to 12.34.56.78 and have different pages show. For example when example1.com is loaded, the file /Library/WebServer/Documents/example1/index.html is loaded. When example2.com is loaded, /Library/WebServer/Documents/example2/index.html is loaded.
    I have tried to do this with virtual hosts, but I can't seem to get it to work. I seem to have permission problems with apache 2 and I get the forbidden error.
    If anyone knows if this is possible, and how to do it that would be of great help. Thanks.

    Awesome, thanks David! I look forward to reading this. I've
    just been
    "dealing" with it. :O)
    Jon
    "David Powers" <[email protected]> wrote in message
    news:elh9uq$el0$[email protected]..
    >I have written a short tutorial on setting up virtual
    hosts in Apache 2.2
    >on Windows. I wrote it as an update for readers of
    "Foundation PHP for
    >Dreamweaver 8", but it contains full instructions, so
    doesn't require a
    >copy of my book to be able to follow it.
    >
    >
    http://foundationphp.com/tutorials/apache22_vhosts.php
    >
    > --
    > David Powers, Adobe Community Expert
    > Author, "Foundation PHP for Dreamweaver 8" (friends of
    ED)
    > Author, "PHP Solutions" (friends of ED)
    >
    http://foundationphp.com/

  • Adding more virtual hosts in Apache

    Hi, When I want to add more virtual hosts to Apache in XAMPP. How does the code looks. Can some one please give an example with 3 virtual hosts.
    Windows Vista 32.
    Is it only adding:      <VirtualHost *:80>
                                  DocumentRoot c:/vhosts/siteA
                                  ServerName siteA
                                  </VirtualHost>
                                  <VirtualHost *:80>
                                  DocumentRoot c:/vhosts/siteB
                                  ServerName siteB
                                  </VirtualHost>                 
                                  <VirtualHost *:80>
                                  DocumentRoot c:/vhosts/siteC
                                  ServerName siteC
                                  </VirtualHost>
    Thanks!

    As it says in step 3 of my tutorial:
    On a separate line, enter 127.0.0.1, followed by some space and the name of the virtual host you want to register. For instance, to set up a virtual host called phpdw, enter the following:
    127.0.0.1   phpdw
    So, if you already have this:
    127.0.0.1     localhost
    ::1           localhost
    It become this:
    127.0.0.1     localhost
    ::1           localhost
    127.0.0.1     phpdw

  • Need info .for connec.with golive 6.0 hosted on Apache serv.

    We have built several sites under Golive 6.0 hosted on
    Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.8b DAV/2 PHP/5.2.11 Server
    Two of them work perfectly well with a connection to Mysql ver 4.1. hosted on a other server.
    The 3rd one cannot connect to the database, the reason seems to be a virtual repertory on the server.(Amen server)
    The site is redirected on a IP adresse . The XML files cannot be read. Would someone have an answer to this problemes.
    Many thanks for your help.
    Keith

    Thank you Marian.
    We are now on golive 6.01, and the first mistake wich occurs in the Golive scripts with are loaded on the Server for PHP language is :
    <ERROR Number="2" Description="Error: "readdir(): supplied argument is not a valid Directory resource" on line 35 of /htdocs/public/www/config/info/ui6.php." />
    We have set the friends to 0.0.0.0  0.0.0.0 for the moment
    I understand now why the Golive must be > 6.0
    Woull you like me to send to you the ini.php file set up on are server by are provider. We have total acess to this file
    Here is the content of ui6.php
    Line 35 is underlined
    <?php
    $GLparam = array(
      * Arrange to send data in the UTF-8 charset.
    'internal_encoding'=>'UTF-8',
    'output_encoding'=>'UTF-8',
    'content_type'=>'text/xml',
    require_once("../include/utils.runtime6.php");
    // Support for Customizable UI for DynamicLink
    // ADOBE SYSTEMS INCORPORATED
    // Copyright 2000-2002 Adobe Systems Incorporated. All Rights Reserved.
    // NOTICE:  Notwithstanding the terms of the Adobe GoLive End User
    // License Agreement, Adobe permits you to reproduce and distribute this
    // file only as an integrated part of a web site created with Adobe
    // GoLive software and only for the purpose of enabling your client to
    // display their web site. All other terms of the Adobe license
    // agreement remain in effect.
    header("Content-type: text/xml; charset=UTF-8");
    $thisFilename = GetCurrentFile();
    $packages = array();
    $handle = opendir(dirname($thisFilename));
    while ($file = readdir($handle)) {
    if (ereg('(.*)\.ui([0-9]+)\.xml$', $file, $regs)) {
      $thisPackageName = $regs[1];
      $thisPackageVersion = $regs[2];
      if ($thisPackageVersion > 100) {
       $thisPackageVersion /= 100;
      } else if ($thisPackageVersion > 10) {
       $thisPackageVersion /= 10;
      if ($thisPackageVersion > 6.0) {
       continue;
      if (isset($packages[$thisPackageName])) {
       $package = $packages[$thisPackageName];
       if ($thisPackageVersion > $package["version"]) {
        $package["version"] = $thisPackageVersion;
        $package["fullname"] = basename($file);
        $package["path"] = $file;
        $packages[$thisPackageName] = $package;
      } else {
       $package = array();
       $package["name"] = $thisPackageName;
       $package["version"] = $thisPackageVersion;
       $package["fullname"] = basename($file);
       $package["path"] = $file;
       $packages[$thisPackageName] = $package;
    closedir($handle);
    echo "<ui6>\r\n\r\n";
    while (list(, $package) = each($packages)) {
    echo "\r\n\r\n<!-- " . $package["fullname"] . " -->\r\n\r\n";
    readfile($package["path"]);
    echo "</ui6>\r\n";
    ?>
    Keith

  • [SOLVED]HELP! Can't change Apache default documentRoot!

    hi, everyone, I encountered a weired apache problem.
    Environment:
         Archlinux 2.6.27
         Apache 2.2.9-4
    Problem:
         I changed apache default DocumentRoot (/srv/http) to another place (/home/qianli/WWW/http), but I got Error 403 unless I used default. My httpd.conf below:
    DocumentRoot "/home/qianli/WWW/http"
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    </Directory>
    <Directory "/home/qianli/WWW/http">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    <IfModule dir_module>
    DirectoryIndex index.html index.htm index.php
    </IfModule>
    My files permissions:
    qianli ~/WWW/http $ ll
    total 32
    drwxr-xr-x 6 qianli qianli 4096 2008-10-22 10:04 .
    drwxr-xr-x 3 qianli qianli 80 2008-10-22 11:03 ..
    drwxr-xr-x 10 qianli qianli 4096 2008-10-10 00:17 acquia
    drwxr-xr-x 2 qianli qianli 1 2008-10-20 17:20 cgi-bin
    -rw-r--r-- 1 qianli qianli 101 2008-10-22 10:04 index.html
    drwxr-xr-x 2 qianli qianli 16 2008-10-21 17:26 logs
    -rwxrwxrwx 1 qianli qianli 22 2008-10-21 14:19 phpinfo.php
    lrwxrwxrwx 1 qianli qianli 20 2008-10-21 12:46 phpmyadmin -> /srv/http/phpMyAdmin
    drwxr-xr-x 2 qianli qianli 24 2008-10-21 14:54 test
    -rw-r--r-- 1 qianli qianli 113 2008-10-21 14:22 test.html
    -rw-r--r-- 1 qianli qianli 8 2008-10-21 14:42 test.txt
    Log:
    [Wed Oct 22 10:43:32 2008] [error] [client 127.0.0.1] (13)Permission denied: access to / denied, referer: http://localhost/
    [Wed Oct 22 10:43:33 2008] [error] [client 127.0.0.1] (13)Permission denied: access to / denied, referer: http://localhost/
    [Wed Oct 22 10:51:15 2008] [error] [client 127.0.0.1] (13)Permission denied: access to / denied, referer: http://localhost/
    I tried to change permission to 777, but I still got 403!
    Last edited by qianli (2008-10-24 04:29:38)

    Change the following
    DocumentRoot "/home/qianli/WWW/http" to DocumentRoot "/home/qianli/public_html"
    <Directory "/home/qianli/WWW/http"> to <Directory "/home/qianli/public_html">
    ScriptAlias /cgi-bin/ "/home/qianli/WWW/http/cgi-bin/" to ScriptAlias /cgi-bin/ "/home/qianli/public_html/cgi-bin/"
    <Directory "/home/qianli/WWW/http/cgi-bin"> to <Directory "/home/qianli/public_html/cgi-bin">
    Create the folder public_html and tell me what errors do you get

  • Stored procedure for getting host name, host instance and status of that host is it running or stopped.

    Hello all,
    yesterday I got one task in that I have to stored procedure for getting host name, host instance and status of that host is it running or stopped.
    any body knows where exactly, In which table this details are there in BizTalk databases.
    thanks

    Status of the host instance is not stored in the SQL database for you to query the status using stored procedure. You have to either use Powershell or WMI to get the status.
    In SQL, following table contains the details about the host like Name, LoginName, IsDisables etc but status of the host instance is not stored in the database.
    SELECT * FROM BizTalkMgmtDb..adm_HostInstance
    Powershell to get the status:
    http://axonolympus.nl/?page_id=186&post_id=969&cat_id=6&lang=en
    WMI to get the status:
    https://msdn.microsoft.com/en-us/library/aa561820.aspx?f=255&MSPPError=-2147217396
    https://msdn.microsoft.com/en-us/library/aa578621.aspx
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Capturing Hosts,cluster,ad Resource information of hosts using SPF REST API

    Hi,
    We are using SCVMM 2012R2 to integrate Hyper-V VMM with java using SPF REST API.For this I am using tenant API. 
    I am able fetch all the entities in VMM using GET query in SPF URL,but I am unable to fetch hosts,cluster and resource information for hosts.
    Can anyone please tell me how will I fetch this information with REST API or does there any other way exists.
    If so please tell  me with the example.
    Thank you.

    Hi ,
    SPF only covers Tenant actions and information. There is no information about hosts and clusters that can be get from SPF.

  • SW2 - Different certificates of Host App and Smart Connect. Host App cannot start.

    I got my SmartWatch 2 today and installed Smart Connect and SmartWatch 2 app from google play, got the smartwatch to pairing with my phone manual bluetooth connect. 
    But in the notification bar i getting " Different certificates of Host App and Smart Connect. Host App cannot start." and i can not go in to settings on Smart Connect for the SW2.
    Please help, right now i can not use the smartwatch becouse of no apps....
    Solved!
    Go to Solution.

    That sounds strange. Have you installed both Smart Connect and SmartWatch 2 from Google Play or did you install them from another source? If installed from Google Play, uninstall (updates) SmartWatch 2 and Smart Connect and then install/update them again from Google Play.
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • How to set up Virtual Hosts in Apache (OS X Server 10.9)

    I want to host more than one website on my mac mini with OS X Server 10.9
    1.) I edited /etc/apache2/httpd.conf for uncommenting the include line:
    # Virtual hosts
    Include /private/etc/apache2/extra/httpd-vhosts.conf
    2.) I edited /etc/apache2/extra/httpd-vhosts.conf and added:
    <VirtualHost *:80>
        ServerName cammino-al-dente.net
        ServerAlias www.cammino-al-dente.net
        DocumentRoot "/Library/Server/Web/Data/Sites/cammino-al-dente.net"
        ErrorLog "/private/var/log/apache2/cammino-al-dente.net.com-error_log"
        CustomLog "/private/var/log/apache2/cammino-al-dente.net-access_log" common
        ServerAdmin [email protected]
    </VirtualHost>
    <VirtualHost *:80>
        ServerName sutterer.net
        ServerAlias www.sutterer.net
        DocumentRoot "/Library/Server/Web/Data/Sites/sutterer.net"
        ErrorLog "/private/var/log/apache2/sutterer.net-error_log"
        CustomLog "/private/var/log/apache2/sutterer.net-access_log" common
        ServerAdmin [email protected]
    </VirtualHost>
    3.) then I edited /etc/hosts/ to spoof my IP address to the domains:
    127.0.0.1
    localhost
    127.0.0.1
    cammino-al-dente.net
    127.0.0.1
    www.cammino-al-dente.net
    127.0.0.1
    sutterer.net
    127.0.0.1
    www.sutterer.net
    255.255.255.255
    broadcasthost
    ::1        
    localhost
    fe80::1%lo0
    localhost
    Then I restarted Apache...But nothing happens :-(
    I could reach my website cammino-al-dente.net only by using the Server Default-entry, chancing the entry to my cammino...-folder
    Regards
    Fred Mario

    In the /etc/apache2/extra/httpd-vhosts.conf file check this line exists:
    NameVirtualHost *:80
    This solve same issue for me.
    I hope it's help.

  • Lost Virtual Hosts After Apache Upgrade

    I have migrated my server from 10.4.11 to 10.5.1. The upgrade appeared to go fine but the virtual hosts I have disappeared. I tried using the 1.3 to 2.2 Apache conversion process but that failed. I tried cleaning up the site files, modified the /var/db/.ApacheVersion file to 2 and then tried copying httpd.conf and sites from a working version of a clean install of 10.5 where I had gotten the virtual hosts to work. I am at a loss. I would be willing to do a clean install of Apache 2 but I am not sure how to do that.
    Interestingly, the mailman pages work for the virtual hosts but no matter what I seem to do, the other web pages for the different sites default to the "Documents" directory.
    Thanks for any help you can provide.
    Paul

    The plot thickens...
    When I do a ps -ax, I see the following processes:
    untitled text 6:16: 47 ?? 0:01.29 /usr/sbin/httpd-1.3 -F -D LAUNCHD
    untitled text 6:43: 102 ?? 0:00.13 /usr/sbin/httpd-1.3 -F -D LAUNCHD
    untitled text 6:80: 325 ?? 0:00.13 /usr/sbin/httpd-1.3 -F -D LAUNCHD
    untitled text 6:86: 529 ?? 0:00.13 /usr/sbin/httpd-1.3 -F -D LAUNCHD
    untitled text 6:94: 2042 ?? 0:01.61 /usr/sbin/httpd -D FOREGROUND
    untitled text 6:104: 2079 ?? 0:00.60 /usr/sbin/httpd -D FOREGROUND
    untitled text 6:105: 2082 ?? 0:00.55 /usr/sbin/httpd -D FOREGROUND
    Also, looking in Console, it appears that errors are being logged in the /var/httpd/ error and access log files and not in the log files assigned by ServerAdmin /var/log/apache2... Though ServerAdmin suggests that I am running 2.2, it appears that I may still be running 1.3. Any suggestions?

  • Virtual hosts in Apache

    I have followed the 'Powers doctrine' in defining virtual
    hosts for my
    Apache installation. This is the relevant section in the
    httpd.conf file
    <VirtualHost *:80>
    DocumentRoot "C:/Program Files/Apache
    Group/Apache2/htdocs/wild"
    ServerName wild
    </VirtualHost>
    <VirtualHost *:80>
    DocumentRoot "C:/Program Files/Apache
    Group/Apache2/htdocs/practical"
    ServerName practical
    </VirtualHost>
    <VirtualHost *:80>
    DocumentRoot "C:/Program Files/Apache
    Group/Apache2/htdocs/navenewell"
    ServerName nni
    </VirtualHost>
    Yet none of them seem to work. When I browse to
    http://wild, for example, I
    get a not found error. I still need to use
    http://localhost/wild to get
    there. What's that about?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================

    no problem glad I could return the help you have given me in
    the past
    Dave Buchholz
    I-CRE8
    www.i-cre8.co.uk
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    Hmm - good idea.... I believe that cracked it.
    Thanks, Dave!
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Dave Buchholz" <[email protected]>
    wrote in message
    news:[email protected]...
    > have you added the entries to the windows hosts file ?
    >
    > --
    > Dave Buchholz
    > I-CRE8
    > www.i-cre8.co.uk
    >
    >
    > "Murray *ACE*" <[email protected]>
    wrote in message
    > news:[email protected]...
    > Dave:
    >
    > I have now added that line to httpd.conf, and restarted
    Apache, but it's
    > still not working as I would expect it to.
    >
    > The documentation mentions a command line I can use with
    Apache to check
    > the
    > virtual server configuration, but it's *nix, referring
    to
    > /usr/local/apache2/bin/httpd -S. This would be handy,
    but I do not see an
    > httpd file or folder within the Apache2/bin folder on my
    XPHome system.
    > Any
    > ideas?
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "Dave Buchholz"
    <[email protected]> wrote in message
    > news:[email protected]...
    >> Murray,
    >>
    >> you don't appear to have actually defined the
    localhost folder, I use
    >> apache
    >> 1.3 and this is how my http.conf file looks:
    >>
    >> NameVirtualHost 127.0.0.1
    >>
    >> <VirtualHost 127.0.0.1>
    >> DocumentRoot "C:\Program Files\Apache
    Group\Apache\htdocs"
    >> ServerName localhost
    >> </VirtualHost>
    >>
    >> <VirtualHost 127.0.0.1>
    >> DocumentRoot "C:\Program Files\Apache
    Group\Apache\htdocs\i-cre8"
    >> ServerName i-cre8.local
    >> </VirtualHost>
    >>
    >> <VirtualHost 127.0.0.1>
    >> DocumentRoot "C:\Program Files\Apache
    >> Group\Apache\htdocs\standardsitephp
    >> ServerName standardsitephp.local
    >> </VirtualHost>
    >>
    >> <VirtualHost 127.0.0.1>
    >> DocumentRoot "C:\Program Files\Apache
    Group\Apache\htdocs\xhtmlsitephp
    >> ServerName xhtmlsitephp.local
    >> </VirtualHost>
    >>
    >> <VirtualHost 127.0.0.1>
    >> DocumentRoot "C:\Program Files\Apache
    Group\Apache\htdocs\cricketclub
    >> ServerName cricketclub.local
    >> </VirtualHost>
    >>
    >> I use the suffix .local on all my localhost sites to
    indentify them. I
    >> used
    >> this tutorial
    http://apptools.com/phptools/virtualhost.php
    as the basis
    >> for
    >> my set-up if that helps.
    >>
    >> --
    >> Dave Buchholz
    >> I-CRE8
    >> www.i-cre8.co.uk
    >>
    >>
    >
    >
    >

  • CFCs and virtual hosts on Apache

    I'm running Apache 2.0.x and using a virtual host to remap
    the document root to a separate drive (d:\public\test)
    When I try to use remoting, I get the error:
    [RPC Fault faultString="File not found:
    C:\WebServer\Apache2\htdocs\test\test.cfc"
    faultCode="Server.Processing" faultDetail="null"]
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::faultHandler()
    Now the htdocs directory is the primary document root for the
    server, but this is being overridden by the specific document root
    change in the virtual host entry. Regular CF pages that reference
    this component work fine, but flex is throwing a fit.
    Any ideas?
    Chris

    try cross domain xml in server root..may be it will work.
    have a look on cross domain help page :
    http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

  • Problem getting db connection when using virtual hosts / tomcat / apache

    Hello,
    I have servlets that use a connection pool to query an oracle database. When running Tomcat 5.5 stand-alone, everything works fine. But the same servlets do not work when running them on a server tomcat and apache integrated with jk and using virtual hosts. The problem is the connection pool, because servlets not using the pool also work fine.
    Does anybody have any idea why this is happening?
    Thank you.
    Logan

    Hi Saish,
    Thank you for helping.
    Try connecting with the machinen's IP, if this is a viable strategy for you (meaning the database IP is not dynamically assigned).I'm not sure how to do this. Here is a copy of my context.xml:
    <Context path="" docBase="" debug="0">
    <Resource name="jdbc/CraigsList" auth="Container"
    type="javax.sql.DataSource" username="craigslist" password="xxxxxx"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@localhost:1521:GRI"
    maxActive="8" maxIdle="4"/>
    </Context>
    Does this help?
    Thanks.

Maybe you are looking for