How to configure Apache Virtual Hosts?

Hi, I was wondering, how does configure Apache virtual hosts for Mac OS X Client 10.4.5? At this time, I have added
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /Library/WebServer/Documents/janus
ServerName janus.php.test
ErrorLog /private/var/log/httpd/janus.php.com-error_log
CustomLog /private/var/log/httpd/janus.php.com-access_log common
</VirtualHost>
Finally, when I try to use the name in the browser, I get the following error message:
Safari can’t find the server.
Safari can’t open the page “http://janus.php.test/” because it can’t find the server “janus.php.test”.
Well, I must go and thanks in advance.
Peace,
-Conrad

If you want to use the fqdn you defined and can/do not want to register it as a Internet Domain you can add it to the hosts file in /etc/hosts if you are comfortable using terminal and the shell
open a terminal
and use the following commands
cd /etc
sudo vim hosts
(you will be prompted for your password here, enter it and hit return)
in vim scroll to the last line which will look like
::1 localhost
type
i
(you are now in insert mode)
type the following line
192.168.0.15 janus.php.test
(replace the ip address with the ip address of the host in question)
hit Control-C
type
:w (vim will confirm in the last line)
type
:q
you are back at the terminal
test your new hosts file by typing
ping janus.php.test
Hope this helps
Mike

Similar Messages

  • How to configure multiple virtual hosts for the same context root /

    Hi,
    I am using Glassfish V1 U1 - b14 on Solaris.
    I am trying to configure two applications to be mapped to the / root context, each one in its own virtual host.
    Two things I have noticed:
    1. I have to manually add virtual-hosts="hostId" in domain.xml/application-ref ... looks like just simply deploying the app does not do that although the application is set as default for its particular virtual host. Is this a bug?
    2. Although I have set for each virtual host the default web-app correctly, and they both respond fine, I cannot map both of them to the / context. The second application (chronologically deployed) does not respond when called with the / context ....
    Any ideas? Is this a bug again?
    Regards,
    Rares
    Message was edited by:
    raresp

    Wow, that's a shame. All mighty Application Server and two different apps on two different virtual hosts are considered ambiguous to have the same context root definition.... Fair play to Tomcat and 90% of the rest of servlet containers!
    In my case I have the same EAR we are planning to deploy to many (up to 30) virtual hosts. Faking different context roots for each deployment will bring unnecessary overheads...
    Should I file a bug or feature request?
    Thanks again for your answer, although you're basically saying it is not possible I will wait and look a while for a possible solution before bringing this topic to a conclusion.

  • How to configure apache to avoid risks while hosting your domain

    Hi all
    I am trying to host my personal site on my machine, and after configuring the personal web i am able to see the apache page when i go to my ip address (the real one, not the one from my router).
    Now, i have little experience with apache on pc, and i remember that there was a bunch of files to set up authentication, users allowed to log in into your site, restrictions to avoid that some guy will sneak on the machine and get out of the web folder....etc.
    Can someone please point me to the right info about how to configure apache on Leopard to avoid unwanted risks while simply hosting a site and a wiki?
    Thanks!

    Leopard client only has a User Interface to turn web sharing on or off. If you want to modify apache you have to do via the command line in the terminal client.
    Out of the box Leopard is configured so that only your sites folder is accessible. and the systemwide webfolder located at /Library/WebServer/Documents
    so if you want your sites folder to be accessible and not the main webserver folder can rename that folder to Documents.bak for example.

  • Apache virtual hosts

    Hello,
    I have a enabled http access to my G4 and also FTP. I now would like to host my other sites.
    How can I enable virtual hosting?
    I have looked at documentation relating to this but have come unstuck as I have tried to look for the areas in the httpd.conf file that controls this. I think I found it but I'm not at all unix or command-line savvy so I don't wish to stuff it up. I have also looked through Apaches' on line documentation but I cant find any straight forward "this is what to change and this is how to change it" document. There seems to be much to do through terminal in order to allow virtual hosts, and there is also security which I believe is contained in other apache files. The mac is standalone and I think I need to allow it to be inetd? Is that right?
    Is there alternative software apart from apple server, that a novice like me can learn from or allow me to set these up through a gui?
    Thanks for your help

    Hi--
    sorry for the delay in responding have been away for
    xmas, will ask for advice on the apache boards,
    You can also ask for advice here. Unless the Apache boards have an area specifically for Apache on OS X, you could get confusing advice. Apple's Apache uses a different file layout than Linux, for example. Also, the Apache on OS X is still version 1.3, so you can get confusing advice there, too.
    but I
    will give nedit a go to see what it does.
    If you find nedit too daunting to install (it requires X Windows, for example, so you'd need that), you should look at Bare Bones' TextWrangler (if you're not already using BBedit, that is). You can use it to open the Apache configuration files. There's even an Apache Configuration Language module that works with TextWrangler. To install it into TextWrangler, just substitute "TextWrangler" in the path given on the Daring Fireball page. It works like a champ with either BBEdit or TextWrangler.
    Do you think it would be worth
    investing in apple server?
    If all you want to do is to set up virtual hosts on your computer, I don't think it's worth it. I haven't used the GUI tools for setting up so I don't know how good they are, though.
    But it's pretty simple to set up a virtual host on regular OS X. Basically, you open up the Apache configuration file. If you're using TextWrangler, and you installed the command line tool, it's as easy as typing this in the Terminal application:
    <pre class="command">edit /etc/httpd/httpd.conf</pre>TextWrangler will take care of the proper authentication when it comes time to make changes or save your file.
    The first thing to look for in your httpd.conf file is the NameVirtualHost directive. By default, it's commented out (has a "#" in front of the line):
    <pre class="command">#NameVirtualHost *:80</pre>Just remove the "#" from the front of the line.
    Then, a little further down, there's an example host but it's commented out:
    <pre class="command">#<VirtualHost *:80>
    # ServerAdmin [email protected]
    # DocumentRoot /www/docs/dummy-host.example.com
    # ServerName dummy-host.example.com
    # ErrorLog logs/dummy-host.example.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common
    #</VirtualHost></pre>I always leave that alone, but start my virtual hosts just below that. It can be as simple as this:
    <pre class="command"><VirtualHost *>
    DocumentRoot "/Library/WebServer/sitedirectory"
    ServerName www.domain.com
    </VirtualHost></pre>You can, however, get fancy and add all kinds of directives into that block, customizing your virtual host as much as you want. My suggestion would be to try setting up a virtual host and see where you get stuck, then post back with questions.
    As for messing up the httpd.conf file, don't worry about it too much. There's a "default" copy of the file in the /etc/httpd directory that you can always go back to. Or, do what I do before I'm about to try something that could turn ugly: make a copy of the current configuration file:
    <pre class="command">sudo cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.cmbak.1</pre>Where I just incremement the "1" on the end. Or I put the date on there: httpd.conf.cmbak.20061229. That way, I always have the current file to fall back on...
    And don't forget: any time you make a change to the httpd.conf file, you have to stop and restart the web server! That's so easy to forget. Also, if you're changing the configuration, these two Terminal commands will be your friends:
    <pre class="command">/usr/sbin/apachectl configtest
    /http -S</pre>
    The first one tells you if you have any syntax errors in your configuration file, the second will tell you about your virtual host setup.
    charlie

  • Struggling with Apache Virtual Hosts

    Hi Folks,
    I'm having trouble getting Apache virtual hosts to function
    on my work PC.
    PHP works. The PHP info page loads fine. I just can't get any
    virtual hosts
    to function. Get "Cannot find server or DNS Error."
    The identical configuration on my home machine works fine.
    Some details
    below.
    Windows HOSTS file:
    127.0.0.1 localhost
    127.0.0.1 mvhms
    Apache 2.0 virtual host settings in httpd.conf file:
    # Use name-based virtual hosting.
    NameVirtualHost *:80
    # Edited by Phil 3/15/2007
    <VirtualHost *:80>
    DocumentRoot c:/htdocs
    ServerName localhost
    </VirtualHost>
    <VirtualHost *:80>
    DocumentRoot c:/htdocs/mvhms
    ServerName mvhms
    </VirtualHost>
    Any help greatly appreciated. Thanks.
    Phil
    Work PC is on a LAN
    Windows XP Pro
    Apache 2.0.59
    PHP 5.1.6
    Reference: PHP for Dreamweaver 8

    Hi Bev,
    I tried various local IP addresses with no luck.
    However, I do think it may be a local LAN or HOSTS file
    issue. If I remove
    the proper references from my home HOSTS file, I get the
    identical behavior
    as my work machine.
    Is there a Windows HOSTS file bypass or Group Policy setting
    that our IT
    department may have changed?
    Phil
    "bsoliman" <[email protected]> wrote in
    message
    news:etcioa$839$[email protected]..
    > You're welcome, Phil.
    >
    > Hmmm, in that case then I'm stumped too. If the exact
    same setup is
    > working
    > for you at home, then I have a sneaking suspicion that
    it has something to
    > do
    > with being on a LAN. Unfortunately, that's just a gut
    instinct and I
    > couldn't
    > tell you what the acutal problem might be. Hopefully
    someone else will
    > come
    > along that can help you out.
    >
    > This is a total shot in the dark: Why not try changing
    127.0.0.1 to your
    > machine's IP address on the LAN? I'm obviously grabbing
    at straws here,
    > but I
    > figure trying something (no matter how farfetched) is
    better than sitting
    > around feeling aggravated while waiting for help :-)
    >

  • PlsqlCGIEnvironmentList for multiple apache virtual host

    a question that's still related to the following thread
    APEX Charts - Error XML Loading falied
    APEX Charts - Error XML Loading falied
    Hi,
    I have multiple apache virtual host for my apex instance. I have trouble loading the flash chart in my virtual hosts.
    I followed the instruction on the above link, it works.
    PlsqlCGIEnvironmentList HTTP_HOST=<my friendly URL>:80
    My question is what if I have multiple virtual hosts?
    Has anyone done this before?
    Thanks.
    -Joel

    Hi Jari,
    You mean these parameter
    PlsqlCGIEnvironmentList SERVER_NAME=external.server.com
    PlsqlCGIEnvironmentList SERVER_PORT=80
    How are those different from HTTP_HOST and what if I have multiple host (virtual)?
    Cheers,
    -Joel

  • How to configure apache for ssl in windows platform

    hi all,
    can anyone help me expalin how to configure apache for ssl in windows platform.

    George,
    I would take the following 'first steps'
    1)Install Apache20 on your Windows machine following the Apache online documentation
    http://httpd.apache.org/docs-2.0/misc/tutorials.html
    2)Make sure you can 'serve up' static HTML content from your Apache Server
    3)Install Weblogic Server per our online documentation
    http://edocs.bea.com/wls/docs61/install/index.html
    4)Also, make sure you can 'serve up' both static and dynamic (e.g., JSP) content
    directly from WLS server
    5)Once you have both of the above 'sanity' checks attempt to configure a simple
    proxy by ppath or mime type via our online documentation
    http://edocs.bea.com/wls/docs61/adminguide/apache.html#103803
    Chuck Nelson
    DRE
    BEA Technical Support

  • How can I connect to multiple WLS instances from a single Apache virtual host

    Configuration : WebLogic 5.1 SP8 & Apache
    I need to be able to have a configuration that looks something like this.
    www.company.com/x -> WL cluster01
    www.company.com/y -> WL cluster02
    In all the examples that I have been able to find they alway defines the the WL
    connection for the entire virtual host, but I need to be able to do it on a location
    basis is that possible?
    Thanks
    Jens Schutt

    httpd.conf:
    <VirtualHost 172.17.9.24:443>
    DocumentRoot "/www/X"
    ServerName qawebivesta.qa.livecapital.com
    ErrorLog /usr/local/apache/logs/qaweb1.error_log
    TransferLog /usr/local/apache/logs/qaweb1.access_log
    SSLEngine on
    SSLCipherSuite
    ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
    SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
    </Files>
    <Directory "/usr/local/apache/cgi-bin">
    SSLOptions +StdEnvVars
    </Directory>
    SetEnvIf User-Agent ".*MSIE.*" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0
    Debug ON
    DebugConfigInfo ON
    <Location /ivesta/>
    SetHandler weblogic-handler
    WebLogicHost qawlgc1
    WebLogicPort 7001
    </Location>
    <Location /TMPPhase2>
    SetHandler weblogic-handler
    WebLogicHost qawlgc1
    WebLogicPort 11001
    </Location>
    </VirtualHost>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /TMPPhase2 works fine, but when I try to access /ivesta I get a 404 from WebLogic
    "https://qawebtmp.qa.livecapital.com/ivesta/index.jsp?__WebLogicBridgeConfig
    Weblogic Apache Bridge Configuration parameters:
         WebLogic Cluster List:
              General Server List:
                   Host: 'qawlgc1' Port: 11001
              DefaultFileName: ''
              PathTrim: ''
              PathPrepend: ''
              ConnectTimeoutSecs: '10'
              ConnectRetrySecs: '2'
              HungServerRecoverSecs: '300'
              MaxPostSize: '-1'
              DynamicServerList: ON
              StatPath: false
              CookieName: WebLogicSession
              Idempotent: ON
              FileCaching: ON
              DisableCookie2Server: OFF
              QueryFromRequest: OFF
              Build date/time: Jun 25 2001 15:09:34
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    This should have been connecting to my 7001 instance not the 11001.
    Thanks
    Jens
    "Eric Gross" <[email protected]> wrote:
    What do you mean the wrong port? Post the complete output from
    WebLogicBridgeConfig as well as the URL you used.
    Also, paste the weblogic relative portions from your httpd.conf
    Thanks,
    Eric
    "jens" <[email protected]> wrote in message
    news:[email protected]...
    I also used ?__WebLogicBridgeConfig to verify that it did pick up thewrong port.
    Here is my build date for mod_wl.so in SP10
    Build date/time: Jun 25 2001 15:09:34
    Thanks
    Jens
    "Eric Gross" <[email protected]> wrote:
    Make sure you are using the latest plugin. As well, add parameter:
    DebugConfigInfo=ON and make a request with a query paramater of
    ?__WebLogicBridgeConfig and you should then see the build date/time.
    We can
    then see if you are indeed using the latest plugin.
    It is not a possibility to get the source.
    Regards,
    Eric
    "jens" <[email protected]> wrote in message
    news:[email protected]...
    And the solution where you put the WebLogic parm under location
    the
    last
    location
    over rule the previous.
    I have also tried to upgrade my plug-in from SP8 to SP10 but that
    didn't
    make
    any difference either.
    Is it possible to get the source code for the plug-in, I'm afraid
    that
    it
    don't
    follow put's all it's parm's a the vhost level no matter where in
    the
    conf
    file
    they are placed.
    HELP
    Jens
    "Eric Gross" <[email protected]> wrote:
    Yu is correct.
    Here is another way to do it as well:
    MatchExpression /x
    WebLogicCluster=server1:port,server2:port|PathTrim=/x
    MatchExpression /yWebLogicCluster=server3:port,server4:port|PathTrim=/y
    The general syntax for this would be:
    MatchExpression exp name=value|name=value
    Where exp=Mime type(*.jsp) or exp=/x(path)
    The next argument in the list is a pipe(|) delimited list ofname=value
    pairs (ie: WebLogicHost, WebLogicPort, WebLogicCluster, PathTrim,
    PathPrepend, etc..).
    Hope this helps.
    Regards,
    Eric
    "Yu Tian" <[email protected]> wrote in message
    news:[email protected]...
    Hi Jens,
    I think you can proxy by ppath.
    <Location /x>
    SetHandler weblogic-handler
    WebLogicCluster cluster1
    </Location>
    <Location /y>
    SetHandler weblogic-handler
    WebLogicCluster cluster2
    </Location>
    thanks
    Yu
    "Jens" <[email protected]> wrote in message
    news:[email protected]...
    Configuration : WebLogic 5.1 SP8 & Apache
    I need to be able to have a configuration that looks something
    like
    this.
    www.company.com/x -> WL cluster01
    www.company.com/y -> WL cluster02
    In all the examples that I have been able to find they alway
    defines
    the
    the WL
    connection for the entire virtual host, but I need to be able
    to
    do it
    on
    a location
    basis is that possible?
    Thanks
    Jens Schutt

  • How to disable coldfusion for an apache virtual host

    Is it possible to disable CF on an per virutal host basis.
    Because i am using a context_root of / (default for cfusion
    eh), all access for images, html, even things I have setup to use
    mod_proxy to go elsewhere are first run past CF. I wish it was
    posible to specify file mappings in the httpd.conf but can't find a
    way to do that. But i have some virtual hosts which have no need
    for CF, is there any way to just shut it off?
    The only thing I can think of is to remove the mod_jrun
    specifications which define cf outside of the virutal host configs,
    but that means a lot more specs per virutal hosts.

    This might be a weird (or maybe unmanagable, because I don't
    know how many sites you have) way to do it, but how about this:
    since Apache has the AddHandler directive that can be used inside
    VirtualHost sections, you could -not- enable the mime type
    extension you use for CF by default, and then only enable it via
    AddHandler on the VirtualHosts where you need CF.
    That way, you'd only have one more spec per VirtualHost and
    you wouldn't have to go back and change anything when you wanted to
    add/remove any of them, whether they run CF or not. This is theory,
    of course, but I will try it on my Linux box now and see if I can
    get it to work.
    &laz;

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

  • How to configure Apache/Portal to service 2 separate groups of  users

    Before someone say this is a Portal issue - please read on.
    I would like to know how to configure Portal to service 2 separate groups of * Internet * users (A and B) all within the same installation so that when a user enters www.aaa.com or www.bbb.com that user is directed to a public page for that group only.
    Currently, when a user of either group enters www.aaa.com or www.bbb.com they arrive at the same public page where they can click on a link and goto their respective private pages (SSO Protected) after logging in.
    My installation facts
    infra - host1.mycompany.com
    portal - host2.mycompany.com (www.aaa.com and www.bbb.com are pointing to this host)
    j2ee - host3.mycompany.com
    I have configured web-cache to listen on port 80 and direct all requests to host2.mycompany.com:7778.
    I used RedirectMatch within host2 httpd.conf to redirect any request to the portal public page.
    I wondering if it is possible to read the "IP NAME" and do a RedirectMatch on it. In other words when a request come into the Apache listener - is it seeing an IP address request or an IP name ie "www.aaa.com". Because if it is - then there may be some way to redirect based upon that. My assumption is the "http://www.aaa.com" cannot be read by RedirectMatch - only the portion after "http://www.aaa.com/mypage" ie "mypage.
    Any help is appreciated!
    Bill G...

    I don't think the issue is one of Apache (not even sure it's one of named virtual hosts since you want both sites to serve the same content). The issue is one of having multiple .local names point to the same machine.
    I don't know this can be done without your own DNS server running in the network.

  • Apache virtual host with OSX Server?

    I have been running OSX Server for a while now, and just recently I decided to get McMyAdmin for my Minecraft server. The web client for McMyAdmin runs on port 8080, but I wanted it on port 80. I wanted to use it with my domain, so I just created a sub domain and pointed it to my server. The problem is that OSX Server apparently doesn't let me use port 80, even when websites are turned off. I decided to delete Server and just use plain apache. This worked until I realized that my website was only accessible locally. I have all the correct ports forwarded, etc. But I get the error:
    Response Error.
    Technical description:
    502 Bad Gateway - Response Error, a bad response was received from another proxy server or the destination origin server.
    when I try to connect from outside my network. This is probably just some simple thing I missed but it would be nice if someone could just point out what I did wrong here. Back to the point, I want to know how to run the proxy to my web client on port 8080 AND ALSO run OSX Server with or without apache virtualhost.
    Thanks in advance,
    Eamon

    Web is stupidly easy - Apache has extensive support for multiple virtual hosts in a single server and will happily support as many domains/hostnames as you can throw at it.
    Mail is a little trickier since it needs to hook into some kind of directory server to validate user addresses.
    Mac OS X's Open Directory does support this, but it's a little cumbersome (basically every user has to exist in the main Open Directory domain as well as having a secondary email address(es) in the other domain(s).
    This can get especially tricky when you have users with the same shortname in different domains - for example if you give [email protected] a secondary email address of [email protected] and you then get a new user [email protected], you can't give the third 'joe' the address 'joe' in Open Directory since that's already taken. This means he'll have to login using different credentials from his email address. Confused yet? You bet.
    If you're prepared to eschew Open Directory you can just use Postfix's built-in support for virtual hosting, but it's a little more complex to setup and support and is entirely command-line based (i.e. there's no GUI for setting it up or supporting it).
    So, for that reason you might be prepared to setup multiple virtual machines for each domain. It really depends on how much the domains are related (if at all).

  • Does Apache Virtual Hosting work with localhost?

    I'm a newbie trying to learn how apache web server works. I've activated apache web server on my Mac PowerBook G4, and tweaked the config file to get PHP, SSI and CGI working.
    If I type the url http://127.0.0.1/ I get the same page as http://localhost/
    If localhost is the domain name for the address 127.0.0.1, can I assign other domain names to 127.0.0.1 using apache's virtual hosting?
    Ti Powerbook G4   Mac OS X (10.4.4)  

    localhost is defined as 127.0.0.1. You can use them interchangeably.
    As for virtual hosts, sure. Apache doesn't care.
    There are two ways of running virtual hosts.
    Port-based virtual hosts use a port number other than the standard 80. They can be accessed via something like http://localhost:8000/
    Name-based virtual hosts look at the hostname header in the request to work out which site to serve. You can run any number of sites on the same port number this way, but you need to be able to control DNS so that it points to your machine.
    If you are just testing this locally you can edit /etc/hosts to add whatever hostnames you like;
    127.0.0.1 localhost my.testsite.com me.mydomain.com
    Now when you enter 'my.testsite.com' or 'my.mydomain.com' in your web browser, /etc/hosts will resolve this to 127.0.0.1 and you'll talk to your local apache server.
    Note that the localhost entries don't have to be in your domain. You can use this to override any real hostname you like.
    Of course, if you want remote users to access this site you'll need to setup something in the DNS, or edit their /etc/hosts files individually.

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

  • Apache Virtual Hosting and WLS 6.0 Apache plug-in

    We have a client that uses Apache and virtual hosting. We also have a
    single webapp that serves these virtual hosts/domains.
    Therefore, all of the served virtual hosts/domain has the same webapp
    directory structure ( e.g.: index.jsp, advert.jsp, css/ )
    For the above to work, we are thinking of getting the requested virtual
    hostname ( supposedly part of the HTTP header sent by the browser as the
    "Host:" parameter ) to figure out how the page will be displayed ... Does
    the Apache plug-in send this information to WLS?

    Apache plugin will forward the "Host" header to wls.
    BTW, HTTP1.0 client will not send the HOST header if I recalled properly since
    HOST header is not part of HTTP1.0 spec.
    Jesus M. Salvo Jr. <[email protected]> wrote:
    >
    We have a client that uses Apache and virtual hosting. We also have a
    single webapp that serves these virtual hosts/domains.
    Therefore, all of the served virtual hosts/domain has the same webapp
    directory structure ( e.g.: index.jsp, advert.jsp, css/ )
    For the above to work, we are thinking of getting the requested virtual
    hostname ( supposedly part of the HTTP header sent by the browser as
    the
    "Host:" parameter ) to figure out how the page will be displayed ...
    Does
    the Apache plug-in send this information to WLS?

Maybe you are looking for

  • HI performance issue.. getting time out error

    hi all. in below code..commented is my original one n i changed it to up to 1 rows. so is it rite this coding..? TABLES: DD03L. DATA: BEGIN OF WDD03M,           FIELDNAME LIKE DD03M-FIELDNAME,           TABNAME LIKE DD03M-TABNAME,           CHECKTABL

  • Downpayment Business process

    Hi, Please explain steps involved in customer down payment from SD point of view. 1. Created milestone billing with down payment. 2. Created sales order with milestone billing. 3. Created down payment request with reference to sales order(doc type FA

  • Backup and Restore of DQS (Data Quality Service SQL 2012) Databases

    We are currently using DPM 2010 running on Server 2008 R2 as our backup solution.  We will soon be leveraging the Data Quality Services in SQL 2012 along with the Master Data Service.   In the SQL 2012 documentation from Microsoft it states, "The bac

  • Helpful link for automator

    I was struggling to figure out where my old contextual automator menu items had gone. I never did determine that, but in the process found a handy web page that helped me fairly quickly reconstruct the couple that I routinely used. You might find the

  • Project Server 2010 new resource customization

    Hi  How to add  Timesheet Manager for a new resource programmatically