Creating Virtual Hosts in Weblogic 8.1

How to create Virtual Host in WLS 8.1
(i.e) , if i type WWW.myapplication.com, the WLS8.1 should fetch the page........

Use the Administration Console to define a virtual host.
Create a new Virtual Host.
Expand the Services node in the left pane. The node expands and displays a list of services.
Click the virtual hosts node. If any virtual hosts are defined, the node expands and displays a list of virtual hosts.
Click Create a New Virtual Host in the right pane.
Enter a name to represent this virtual host.
Enter the virtual host names, one per line. Only requests matching one of these virtual host names will be handled by the WebLogic Server instance or cluster targeted by this virtual host.
Click Create.
Define logging and HTTP parameters:
(Optional) Click on the Logging tab and fill in HTTP access log attributes (For more information, see Setting Up HTTP Access Logs.)
Select the HTTP tab and fill in the HTTP Parameters.
Define the servers that will respond to this virtual host.
Select the Targets --> Servers tab. You will see a list of available servers.
Select a server.
Click Apply.
Define the clusters that will respond to this virtual host (optional). You must have previously defined a WebLogic Cluster. For more information, see Using WebLogic Server Clusters.
Select the Targets tab.
Select the Clusters tab. You will see a list of available clusters.
Select a cluster.
Click Apply.
Target Web Applications to the virtual host.
Click the Web Applications node in the left panel.
Select the Web Application you want to target.
Select the Targets tab in the right panel.
Select the Virtual Hosts tab.
Select Virtual Host.
Click Apply.
You must add a line naming the virtual host to the etc/hosts file on your server to ensure that the virtual host name can be resolved.

Similar Messages

  • Configuring a virtual host in Weblogic

    Hi,
    I created a virtual host in Weblogic but it doesn't work. I followed all of the steps from the Weblogic website.
    The default URL for my application works, http://localhost:7001/abc_application but when I try using the new virtual host I get an error,
    http://xyz.com:7001/abc_application. I applied the virtual host to my Weblogic Managed Server and also to a deployed application. What else needs to be done outside of Weblogic for this to work?
    Sorry for the cross-posting.
    Thanks,
    Annette

    Hi Annette!
    Have you modified the hosts file for your machine to add an entry for xyz.com to map back to 127.0.0.1?
    What sort of errors are you getting when you try to access the virtual host? Can you post a snippet from your log file?
    Apologies if your problem has been solved since posting this message...
    <br>
    Kevin Powe
    http://www.integral-techsolutions.com

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

    Not 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?
              

  • Virtual host in weblogic 5.1

    Hi all
    How do i set up a virutal hosting feature in weblogic 5.1? For eg., Current url
    = http://[email protected]:1234/myapplication
    Alias Request = http://<anything.com>/support/check/myapplication
    please help. It's urgent.
    with regds
    siva

    hi.
    Virtual hosting is supported in WLS 6.x. It is not supported in 5.1.
    FWIW our apache plugin for WLS 5.1 does support apache virtual hosting. I'm not
    sure if this is relevant to what you want to accomplish.
    You might want to post questions like this in
    weblogic.developer.interest.webserver.
    Thanks,
    Michael
    siva wrote:
    Hi all
    How do i set up a virutal hosting feature in weblogic 5.1? For eg., Current url
    = http://[email protected]:1234/myapplication//[email protected]:1234/myapplication
    Alias Request = http://<anything.com>/support/check/myapplication
    please help. It's urgent.
    with regds
    siva--
    Developer Relations Engineer
    BEA Support

  • Virtual Host on WebLogic Server 5.1

    I need to configure my weblogic server 5.1 on windows 2000 server to make a virtual
    host address.
    How I can do it ????
    Thanks a lot for any help.
    Bye

    Hi Andy,
    I think a good approach for you would be to use a proxy server --
    browser -> proxy that supports virtual hosting -> WebLogic
    Use a proxy which supports virtual hosting, and which can have a separate
    certificate bound to each virtual host.
    That way you can do SSL between the browser and the proxy, and you can
    have the proxy do cleartext to WebLogic.
    This situation gets around WebLogic's limitation of allowing only one
    certificate per instance of the server.
    You could also use 5.1 as the proxy in the following manner:
    Run 3 instances of Weblogic, each as a proxy server, each bound to a
    different IP address and DNS name, having its own certificate --
    one instance for aaa.com, another for bbb.com, and a third for ccc.com
    Then have each of these three instances of WebLogic proxy to your "app
    server" instance of WebLogic on the backend.
    Hope this makes sense.
    Joe Jerry
    Andy Walker wrote:
    Hello,
    I am tasked with implementing a virtual hosting situation that must
    use SSL. It goes like this: https://www.aaa.com, https://www.bbb.com
    and https://www.ccc.com all having separate IPs. These URLs must
    forward the request to the same WebLogic Server instance. The problem
    is each URL must have its own certificate while WLS 5.1 only uses one
    certificate per instance.
    I was thinking about using a proxy server such that all three Web
    servers that would host the URLs would be sent to a proxy server which
    would redirect to the WLS 5.1 instance.
    My questions are, would this be feasible using WLS 5.1 as the Web
    Server and again WLS as the App Server? How secure is this
    arrangement? Is it preferable to use another vendor's software as the
    WebServer(IPlanet, Apache)

  • SSL with virtual hosting in Weblogic Server 5.1(WLS5.1)

    Hello,
    I am tasked with implementing a virtual hosting situation that must
    use SSL. It goes like this: https://www.aaa.com, https://www.bbb.com
    and https://www.ccc.com all having separate IPs. These URLs must
    forward the request to the same WebLogic Server instance. The problem
    is each URL must have its own certificate while WLS 5.1 only uses one
    certificate per instance.
    I was thinking about using a proxy server such that all three Web
    servers that would host the URLs would be sent to a proxy server which
    would redirect to the WLS 5.1 instance.
    My questions are, would this be feasible using WLS 5.1 as the Web
    Server and again WLS as the App Server? How secure is this
    arrangement? Is it preferable to use another vendor's software as the
    WebServer(IPlanet, Apache)

    Hi Andy,
    I think a good approach for you would be to use a proxy server --
    browser -> proxy that supports virtual hosting -> WebLogic
    Use a proxy which supports virtual hosting, and which can have a separate
    certificate bound to each virtual host.
    That way you can do SSL between the browser and the proxy, and you can
    have the proxy do cleartext to WebLogic.
    This situation gets around WebLogic's limitation of allowing only one
    certificate per instance of the server.
    You could also use 5.1 as the proxy in the following manner:
    Run 3 instances of Weblogic, each as a proxy server, each bound to a
    different IP address and DNS name, having its own certificate --
    one instance for aaa.com, another for bbb.com, and a third for ccc.com
    Then have each of these three instances of WebLogic proxy to your "app
    server" instance of WebLogic on the backend.
    Hope this makes sense.
    Joe Jerry
    Andy Walker wrote:
    Hello,
    I am tasked with implementing a virtual hosting situation that must
    use SSL. It goes like this: https://www.aaa.com, https://www.bbb.com
    and https://www.ccc.com all having separate IPs. These URLs must
    forward the request to the same WebLogic Server instance. The problem
    is each URL must have its own certificate while WLS 5.1 only uses one
    certificate per instance.
    I was thinking about using a proxy server such that all three Web
    servers that would host the URLs would be sent to a proxy server which
    would redirect to the WLS 5.1 instance.
    My questions are, would this be feasible using WLS 5.1 as the Web
    Server and again WLS as the App Server? How secure is this
    arrangement? Is it preferable to use another vendor's software as the
    WebServer(IPlanet, Apache)

  • Apache Virtual Hosts and Weblogic 5.1SP6

    Running:
    WebLogic Server 5.1.0 w/ Service Pack 6
    Solaris 7
    Hello, I've been reading through the newsgroups and saw alot of information on
    setting up apache and weblogic to handle virtual hosts, but am still having problems
    getting it to work.
    I have 2 domains that will be served up by one instance of Apache using NameBased
    virtual hosts and I would like to have our one instance of WebLogic 5.1SP6 handle
    them as well.
    Excerpt from my httpd.conf file:
    NameVirtualHost 216.xx.x.xx:80
    <VirtualHost vcstgws011:80>
    ServerName vcstgws011.domain1.com
    Port 80
    DocumentRoot /opt/vci-10.8/webapps/www
    DirectoryIndex index.jsp
    <Directory "/opt/vci-10.8/webapps/www">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>
    <VirtualHost vcstgws011:80>
    ServerName www.domain2.com
    Port 80
    DocumentRoot /opt/vci-10.8/webapps/www/dsl
    DirectoryIndex index.jsp
    <Directory "/opt/vci-10.8/webapps/www">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>
    Under my default server configuration I have the WebLogic stuff:
    <IfDefine WL>
    WebLogicCluster vcstgas011.domain1.com:7001
    Debug on
    DebugConfigInfo on
    ConnectTimeoutSecs 60
    HungServerRecoverSecs 300
    Debug on
    DebugConfigInfo on
    <Files *.jsp>
    SetHandler weblogic-handler
    </Files>
    <Location /weblogic>
    SetHandler weblogic-handler
    PathTrim /weblogic
    </Location>
    <Location /servlet>
    SetHandler weblogic-handler
    </Location>
    <Location /Admin*>
    SetHandler weblogic-handler
    </Location>
    <Location /j_security_check>
    SetHandler weblogic-handler
    </Location>
    </IfDefine>
    And here's an excerpt from my weblogic.properties file:
    # HTTPD
    weblogic.httpd.enable=true
    # DocumentRoot configuration
    weblogic.httpd.defaultWebApp=/opt/vci-10.8/webapps/www
    weblogic.httpd.indexDirectories=true
    Any help would be appreciated.
    Thanks,
    Mark

    Anyone have success with Name-Based virtual hosts using same instance of WebLogic?
    "Mark Mangano" <[email protected]> wrote:
    >
    Running:
    WebLogic Server 5.1.0 w/ Service Pack 6
    Solaris 7
    Hello, I've been reading through the newsgroups and saw alot of information
    on
    setting up apache and weblogic to handle virtual hosts, but am still
    having problems
    getting it to work.
    I have 2 domains that will be served up by one instance of Apache using
    NameBased
    virtual hosts and I would like to have our one instance of WebLogic 5.1SP6
    handle
    them as well.
    Excerpt from my httpd.conf file:
    NameVirtualHost 216.xx.x.xx:80
    <VirtualHost vcstgws011:80>
    ServerName vcstgws011.domain1.com
    Port 80
    DocumentRoot /opt/vci-10.8/webapps/www
    DirectoryIndex index.jsp
    <Directory "/opt/vci-10.8/webapps/www">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>
    <VirtualHost vcstgws011:80>
    ServerName www.domain2.com
    Port 80
    DocumentRoot /opt/vci-10.8/webapps/www/dsl
    DirectoryIndex index.jsp
    <Directory "/opt/vci-10.8/webapps/www">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>
    Under my default server configuration I have the WebLogic stuff:
    <IfDefine WL>
    WebLogicCluster vcstgas011.domain1.com:7001
    Debug on
    DebugConfigInfo on
    ConnectTimeoutSecs 60
    HungServerRecoverSecs 300
    Debug on
    DebugConfigInfo on
    <Files *.jsp>
    SetHandler weblogic-handler
    </Files>
    <Location /weblogic>
    SetHandler weblogic-handler
    PathTrim /weblogic
    </Location>
    <Location /servlet>
    SetHandler weblogic-handler
    </Location>
    <Location /Admin*>
    SetHandler weblogic-handler
    </Location>
    <Location /j_security_check>
    SetHandler weblogic-handler
    </Location>
    </IfDefine>
    And here's an excerpt from my weblogic.properties file:
    # HTTPD
    weblogic.httpd.enable=true
    # DocumentRoot configuration
    weblogic.httpd.defaultWebApp=/opt/vci-10.8/webapps/www
    weblogic.httpd.indexDirectories=true
    Any help would be appreciated.
    Thanks,
    Mark

  • Built-in cf server - creating virtual host

    Hi
    I'm using the built-in coldfusion server developer edition on
    linux - am I able to create a virtual host? I've only found
    information relating to apache so far
    Many thanks
    Dave

    what do you mean by a virtual host? use the built in
    webserver it works on windows

  • Create Virtual Host

    We want to create a virtual host in WAS J2EE 6.40, and we´ve used the
    visual administration: Server -> Services -> HTTP Provider
    (http://help.sap.com/saphelp_webas630/helpdata/en/0b/fbf5a47928f84e8d0beba8371508e6/content.htm).
    Our problem is that it doesn´t work. We think that we have to configure
    the Dispatcher -> Services -> HTTP Provider
    (http://help.sap.com/saphelp_webas630/helpdata/en/5b/82d3c3ee9691418e6b0281f933a37d/content.htm), but we don´´t know what is exactly.
    The DNS also is updated.
    Best Regards.
    Raul Martinez.

    Have you update the windows hosts file ?

  • Trouble creating virtual host

    Hello,
    I just purchased David Powers' books, Essential Guide to DW
    CS3 and PHP Object-Oriented Solutions and am anxiously awaiting
    their arrival. In the meantime, I installed xampp's version of
    Apache, PHP, MySQL, etc. That install went fine and after some
    playing around I was able to view the localhost files that came
    with it. Now I am on to get a virtual host setup so that I can do
    my testing off-line. I followed the tutorial on David's site, but
    my files do not load in the browser (Firefox) window. If I type
    http://TSDevelopment or
    http://TSDevelopment/Home.php
    the browser forwards me to
    http://tsdevelopment/xampp
    and I see the same screen as if I went to
    http://localhost, namely xampp's
    welcome screen.
    I have gone over the David's tutorial twice and can't see
    that I am missing anything, but I must have (?).
    I am running on an XP Professional system.
    Any help will be greatly appreciated.
    Cheers and Merry Christmas,
    Mike

    You don't *really* need virtual hosts to test many pages.
    Virtual hosts are
    necessary, though, if you are using root relative links.
    So - when you browse to
    http://localhost, you see the XAMPP
    screen? That's
    good.
    What have you done so far to get your virtual hosts setup?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Mike-H" <[email protected]> wrote in
    message
    news:gioo45$cm5$[email protected]..
    > Hello,
    >
    > I just purchased David Powers' books, Essential Guide to
    DW CS3 and PHP
    > Object-Oriented Solutions and am anxiously awaiting
    their arrival. In the
    > meantime, I installed xampp's version of Apache, PHP,
    MySQL, etc. That
    > install
    > went fine and after some playing around I was able to
    view the localhost
    > files
    > that came with it. Now I am on to get a virtual host
    setup so that I can
    > do my
    > testing off-line. I followed the tutorial on David's
    site, but my files do
    > not
    > load in the browser (Firefox) window. If I type
    http://TSDevelopment or
    >
    http://TSDevelopment/Home.php
    the browser forwards me to
    >
    http://tsdevelopment/xampp
    and I see the same screen as if I went to
    >
    http://localhost, namely xampp's
    welcome screen.
    >
    > I have gone over the David's tutorial twice and can't
    see that I am
    > missing
    > anything, but I must have (?).
    >
    > I am running on an XP Professional system.
    >
    > Any help will be greatly appreciated.
    >
    > Cheers and Merry Christmas,
    > Mike
    >

  • How to create and access a Virtual Host on the J2EE WAS?

    Hello, I have searched through the Forums and help.sap.com and found a lot of information on how to set up a Virtual Host on the J2EE server but am having issues with it working.
    The goal is to provide a simple virtual host on the J2EE Portal server to host some static image and HTML files. Previously I had stored these files in the standard publicly accessible SAP J2EE folder location /usr/sap/<SID>/JCxx/j2ee/cluster/serverx/apps/sap.com/com.sap.engine.docs.examples/servlet_jsp/_default/root/. This location is resolved to when using the URL <host>:50000 for example.
    The main issue here is that during Portal support pack applications this folder gets wiped out and we have to remember to save off any custom files and folders in this location and replace them.
    I would like to create a virtual host to store these static files (i.e., branding-image.jpg, etc...).
    I have run through the process of creating the virtual host both using Visual Administrator and <host>:50000/nwa but am not able to get the virtual host name to resolve properly.
    The following are the steps that I have taken. Let's assume the standard SAP portal (i.e., xSS, etc...) is running properly on <host>:50000.
    1. create virtual host via Visual Administrator/NWA called 'sapwebserver1' by using the Create Host option (takes on the attributes of the 'default' standard virtual host)
    2. change the root directory for this virtual server to a custom folder at E:/tmp/mimes (where E:/usr is where the J2EE files are all installed), no start files were set up and nothing else was changed in the new virtual host record, no permissions were changed on the /tmp/mimes folder from whatever the default Windows user permissions are normally set, I am using a local Windows  administrator account but I have not seen any reference in the help files or the examples that indicate that any specific permissions updates need to be made on the virtual host root folder
    3. restarted the J2EE server as well as the HTTP Provider service
    4. before updating the company DNS, I wanted to test this locally on the server and so have updated the server's local HOSTS file with a <host IP address>   sapwebserver1 entry
    5. from that server I can ping the sapwebserver1 virtual host name and it resolves properly to the machine's physical IP address
    According to all of the documentation and examples I have seen I should now be able to (from that server) launch a browser and access the static files in the virtual host by referring to http://sapwebserver1:50000/branding-image.jpg for example. This is not working and the browser just brings up a Cannot display the web page error in IE. By referring to the virtual host name sapwebserver1:50000 it's supposed to hit the J2EE server and based on the host name sapwebserver1 realize that it should resolve to the root directory E:/tmp/mimes. This is not happening. Just as a test I have created a copy of the 'default' virtual host and called it sapwebserver2, updated the local HOSTS file for this entry, and tried to see if that would work like the 'default' host. My expectation was that http://sapwebserver2:50000 would behave the same was as http://<host>:50000 but it too fails to resolve just like the sapwebserver1 virtual host refernce.
    Would anyone happen to have any pointers on what to do next? I just want a simple virtual host to be able to serve up some static images and files.
    Thanks for any insight or assistance you might be able to provide here.
    Graham

    This defeats the purpose of trying to centralize SAP-related web resources on the SAP server. Typically IIS/Apache or other non-SAP servers are under the control of IT and not the SAP BASIS group.
    We simply would like to have a centralized location to store static web files so that they are not overwritten during Portal support pack applications.

  • Creation of Virtual Directory in weblogic.xml (OBIEE11 Weblogic)

    We are using OBIEE 11.1.1.6.4, we want to create a Virtual directory mapping in weblogic server so that we can place our static image files to access from the application URL.
    To do this activity, we have performed following steps -
    1) Navigated to C:\OBIEE11G\Oracle_BI1\bifoundation\jee
    2) Open analytics.ear file
    3) Existing code in weblogic.xml is: (if weblogic.xml is not present we need to create the file with below code)
    <?xml version = '1.0' encoding = 'US-ASCII'?>
    <weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
    <session-descriptor>
    <cookie-path>/analytics</cookie-path>
    </session-descriptor>
    </weblogic-web-app>
    4) We have added virtual-directory-mapping tag; After adding virtual directory mapping tag, the code in weblogic.xml is
    <?xml version = '1.0' encoding = 'US-ASCII'?>
    <weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
    <session-descriptor>
    <cookie-path>/analytics</cookie-path>
    </session-descriptor>
    <virtual-directory-mapping>
    <local-path>D:/virtualdirectory</local-path>
    <url-pattern>/images/*</url-pattern>
    <url-pattern>*.jpeg</url-pattern>
    </virtual-directory-mapping>
    </weblogic-web-app>
    5) We have created a folder virtualdirectory under D: drive. And then created a folder images within folder virtualdirectory.
    6) Then we have placed an image (lets say) test.jpeg within image folder.
    7) Restarted all BI services,
    8) Now when we try to access URL http://localhost:9704/analytics/images/test.gif. Now we are able to see the image, it’s working perfectly fine.
    If we paste the above URL in browser it will automatically displays the image without any authentication. So our requirement is, on pasting the URL in browser first it should redirect to OBIEE homepage and when authentication is done then it should display the image.
    Request you to please advise with your inputs.

    Why did you modify analytics.ear ?
    Should'nt you make changes here : Middleware_Home>\instances\instance1\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1
    \analyticsRes\WEB_INF\web.xml
    Follow this note : OBIEE 11g: How To Access Custom Files Through URL By Creating Virtual Directory In Weblogic Server? [ID 1408240.1]
    And you should be able to deploy that virtual directory and access it after authentication.
    HTH,
    SVS

  • How to confiture virtual hosts with multiple domain names

    hello,
    I've read through some of the postings here on virtual hosts, but I thought I'd better solicit advice before I actually try some of the things I've read about.
    In a nutshell, I've purchased multiple domain names that I'd like to alias to a new site (currently it is just a subfolder in the main site directory) on my OS 10.3.x server. There is only the one main site configured right now on the box, so I know I need to set up a second "virtual site" pointing to the files in this subfolder to make it function as its own site.
    I've dabbled around with the sites settings in the GUI, but I'd probably be most comfortable setting all this up in the httpd.conf by hand if I could. But I'm weary of this because I know it might be better to use the GUI because of OS X Server's flavor of WebObjects and Apache (sigh).
    So, I have two main questions:
    1) How would I set up this second site using the GUI in server settings? Do I need to first move the subfolder out of the main folder before it can be designated its own site? Or can I just point to it in the GUI? Can I use one of my purchased domain names in the domain field?
    2) Currently, I have URL Forwarding set with my multiple domain names, but I'm thinking there might be a better way to do this? For SEO I'd rather use some type of redirect rather than being penalized by search engines for having what looks to be multiple domains pointing to the same site.I'm thinking I should create virtual sites for each domain name I've purchased with a hard redirect back to the main site?
    Any suggestions would be appreciated.
    Thanks
    G4 Mac OS X (10.3.9) 10.3.9 Server
    G4 Mac OS X (10.3.9) 10.3.9 Server

    thank you for your reply.
    > You can create each site as a new Site in Server
    Admin. When you do this you can choose any
    directory on disk as the document root for each
    site.This means you can move the sites' folders out of
    /Library/WebServer/Documents if you like - you could
    create /Library/WebServer/site1,
    /Library/WebServer/site2, etc. (or even be outside of
    /Library/WebServer if you want).
    so, are you are saying that I could designate one site to be
    /Library/WebServer/Documents/site1
    and another to be
    /Library/WebServer/Documents/site1/directory1
    even though directory1 is contained within site1's structure? I'm not advancing this as a good idea, necessarily. I'm just wondering if Apache would complain.
    > Each site should have the domain name set as per your
    registered domains. Apache will need this to
    determine the correct site to serve for each
    request.
    Well, after some additional research I'm thinking I'm missing a critical piece of the puzzle. That being access to the DNS host server that manages the context of my server. I have purchased domain names through an outside registrar that point to my site and I can create virtual hosts on my server, but I don't have the ability to add the new virtual host names into the DNS server that manages my box. If that makes sense. Or maybe I'm missing something?
    >
    I'm not sure why you're using URL forwarding at all.
    Without that piece of information it's impossible to
    tell you whether you should continue using them or
    not - in general there's no need to use URL
    forwarding if you have multiple Virtual Hosts setup,
    but it sounds like you have multiple hostnames
    pointing to the same content, so your needs may be
    different.
    I'm using forwarding for the reason I list above. I didn't purchase hosting with the registrar where I purchased my domain names, so they are parked on the registrar's name server with URL forwarding to my server. The DNS server that manages my box resides in a different location and I don't have the ability to add DNS entries pointing to virtual hosts that I want to set up. Am I stuck?
    G4 Mac OS X (10.3.9) 10.3.9 Server

  • Web sharing - virtual hosts and CGI

    This topic might be a bit advanced for this forum, I'm not sure. But here goes.
    I'm trying to set up my laptop to act like a web server so that I can do test development on it. I have two web sites, and have successfully created virtual hosts for each of them.
    The part that I'm struggling with now is enabling CGIs, as I want to learn to write CGIs in Perl. I can't seem to find any site that discusses how this is done in Leopard. One said something like "just put the CGIs into /Library/WebServer/CGI-Executables and it'll work", but of course, since I've got virtual hosts defined, it seems that anything addressed to "localhost" defaults to the first virtual host and thus there is no way to refer to a CGI placed in that location. Besides which, I'd like to know how to enable CGIs placed in a folder on each of my virtual sites, so that I could test them in place.
    Any ideas?

    One said something like "just put the CGIs into /Library/WebServer/CGI-Executables and it'll work", but of course, since I've got virtual hosts defined, it seems that anything addressed to "localhost" defaults to the first virtual host and thus there is no way to refer to a CGI placed in that location.
    That is an incorrect assumption.
    By default, Apache is configured to recognize any URI that begins with /cgi-bin and serve that request via a CGI script in /Library/WebServer/CGI-Executables
    This is true even though each site's DocumentRoot is set somewhere else on the file system (that's by design since it makes it harder for a remote attacker to affect your CGIs)
    Since it does not matter which site the request was on, any /cgi-bin request would be served from there, so:
    http://www.domain1.com/cgi-bin/some.cgi
    http://www.domains2.net/cgi-bin/other.cgi
    would both be served from /Library/WebServer/CGI-Executables even though they are for two different virtual hosts.
    Now, of course, if you want each site to be separate and have its own set of CGIs (maybe some.cgi for domain1 does something different from some.cgi on domain2) then this approach causes problems. For this you will need to edit each site to have its own cgi-bin directory.
    Unfortunately (although I haven't tested it) I think Matt's solution won't work because Apache is going to catch all /cgi-bin/ requests and serve them from /Library/WebServer/CGI-Executables, never getting to the cgi-bin directory within each site's documentroot.
    To set site-specific CGI directories you need to add a ScriptAlias command to each site's .conf, such as:
    ScriptAlias /cgi-bin/ /path/to/site/cgi-bin/
    This tells apache that any request for /cgi-bin/* should be served from /path/to/site/cgi-bin
    Ideally the path should be outside of the site's normal document root, but it can be inside if you really want.

  • Questions Re: Virtual Hosts & MAMP

    I hired a computer science student to install and configure MySQL, phpMyAdmin and virtual hosts on my MacBook Pro, but he screwed it up. So I tried to figure it all out myself once again. I finally downloaded a preconfigured package called MAMP. I now apparently have PHP, MySQL and phpMyAdmin up and running on my machine. But that still leaves virtual hosts.
    I checked out the MAMP Pro version ($50) at
    http://www.living-e.com/products/MAMP-PRO/index.php and read "You can set up many virtual hosts."
    That doesn't make sense to me; shouldn't you be able to set up many virtual hosts even with the free version of MAMP? Or does MAMP somehow make it EASIER to create virtual hosts, and the Pro version simply allows you to make many of these simplified virtual hosts?
    Unfortunately, MAMP's support forums seem pretty lame, so I decided to ask some questions here. If MAMP Pro does indeed make it easy to create virtual hosts, then I'll purchase it immediately.
    If it doesn't, then can anyone point me to a tutorial that explains the entire process, as clearly as possible? I've modified my httpd.conf, hosts and NetInfo files till I'm blue in the face and have asked questions on three different forums. I was able to create virtual hosts even on my PC; surely it can't be that much harder on a Mac.
    Thanks!

    Yeah, in another post he decided he does not like the Netinfo solution as he is a new Mac user and wants to keep it simple. I believe Netinfo is for DNSing the localnet anyway.
    It turns out it is incredibly simple to configure Virtual Hosts. In fact, it is even simpler in Apache 2 than Apache 1.3 because there is a separate component for configuring the Virtual Domains. Here's hoping OSX 10.5 includes Apache 1.2.
    What you do is you first edit your hosts file:
    sudo nano /private/etc/hosts
    Add these lines to point to your local machine domains:
    127.0.0.1 host2.example.com
    127.0.0.1 Test
    Here we are using
    http://host2.example.com/
    and
    http://Test/
    as our domains. When you are set up click these links and the pages should open in your browser.
    Edit the file at
    sudo nano /private/etc/httpd/httpd.conf
    to include these Virtual Domain blocks somewhere in the file:
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /Library/WebServer/Documents/Test/
    ServerName Test
    ServerAlias Test
    ErrorLog /Library/WebServer/Documents/logs/Test-error_log
    CustomLog /Library/WebServer/Documents/logs/Test-access_log common
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /Library/WebServer/Documents/host2/
    ServerName host2.example.com
    ErrorLog /Library/WebServer/Documents/logs/host2.example.com-error_log
    CustomLog /Library/WebServer/Documents/logs/host2.example.com-access_log common
    </VirtualHost>
    Note that the file does not even contain sample blocks in the config file as Virtual Hosts has been a recent invention. Apache 2, however, integrates VHosts seamlessly.
    In this example, I transcribed paths from the default OSX 10.4 Apache installation, so you may need to adjust the paths a bit since it is untested. Please report back so we can adjust the documentation accordingly.
    When finished, put some default docs in the target folders and restart Apache:
    sudo apachectl restart
    You should be up and running. You may need to reboot for the hosts file to activate, unless you know how to dump the cache like a Unix geek.
    Oh, and thanks for the patience on this one, I have been figuring it out too.

Maybe you are looking for

  • How do I make Firefox never use any plugins without my direct approval? (Take 2)

    Since my old topic is "archived" and tells me to ask a new question, I'll do exactly that. As I have asked here https://support.mozilla.org/en-US/questions/957837?esab=a&s=&r=0&as=s I need a way to control what my browser does and what it does not. B

  • Do I need a router or a switch

    I have an adsl (UK) modem and it is linked to an Airport extreme giving a wireless network all works fine. I now need to take a fixed wire internet connection to a separate component of the electrical system for web based security monitoring. Clearly

  • File content conversion example

    If the first line  in the FCC file is  having some company Info. from the next lin onwards it is having the data. i have to avoid that info & transfer the data only Hoew can proceed?

  • Problem to update JTree

    Hello world :) I use JDK 1.6 update 2. My problem description: I have a database with product categories. Each category can have unlimited subcategories. For displaying it's structure in a JTree I've extended DefaultTreeModel, override some necessary

  • Entry point property in roles

    Hi Experts, Can anybody tell me what is Entry point property in roles ? Thanks a lot .