Virtual Hosts - almost there???

Ok I have read just about every post on here about virtual hosts, and I picked up a copy of "Apache The difinative guide" I still can't figure this thing out. I added the NameVirtualHost line and following at the very end of the file.? Is that where it goes? Like this...
### The following Include directive is essential for the virtual hosts to be usable.
Include "/etc/httpd/sites/*.conf"
NameVirtualHost *
<VirtualHost www.WEB1.com>
ServerName www.WEB1.com
DocumentRoot "STUFF"
</VirtualHost>
<VirtualHost www.WEB2.com>
ServerName www.WEB2.com>
DocumentRoot "STUFF2"
</VirtualHost>
<VirtualHost mail.WEB1.com>
ServerName mail.WEB1.com
DocumentRoot /usr/share/squirrelmail
</VirtualHost>
Does that look right?
I then went into the host conf file and that now looks like this...
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
192.168.111.6 www.WEB1.com
192.168.111.6 www.WEB2.com
192.168.111.6 mail.WEB1.com
think thats right anyway...
In server admin each site has been setup with www.WEB1.com, and www.WEB2.com respectivly under domain name and address is the Server IP and port 80. Under the settings all boxes in options are unchecked i.e. folder listing, performance cache...Under the Aliases tab each page has one listed www.WEB1.com for 1 and www.WEB2.com for the second.
Now you type in a browser www.WEB1.com and you get it. You type in www.WEB2.com and you get nothing.
What am I missing???

Ok I have read just about every post on here about
virtual hosts, and I picked up a copy of "Apache The
difinative guide" I still can't figure this thing
out. I added the NameVirtualHost line and following
at the very end of the file.? Is that where it goes?
Like this...
### The following Include directive is essential for
the virtual hosts to be usable.
Include "/etc/httpd/sites/*.conf"
NameVirtualHost *
<VirtualHost www.WEB1.com>
ServerName www.WEB1.com
DocumentRoot "STUFF"
</VirtualHost>
<VirtualHost www.WEB2.com>
ServerName www.WEB2.com>
DocumentRoot "STUFF2"
</VirtualHost>
<VirtualHost mail.WEB1.com>
ServerName mail.WEB1.com
DocumentRoot /usr/share/squirrelmail
</VirtualHost>
Does that look right?
No this does not look right and I'm trying hard not to laugh.
I then went into the host conf file and that now
looks like this...
# Host Database
# localhost is used to configure the loopback
interface
# when the system is booting. Do not change this
entry.
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
192.168.111.6 www.WEB1.com
192.168.111.6 www.WEB2.com
192.168.111.6 mail.WEB1.com
think thats right anyway...
In server admin each site has been setup with
www.WEB1.com, and www.WEB2.com respectivly under
domain name and address is the Server IP and port 80.
Under the settings all boxes in options are unchecked
i.e. folder listing, performance cache...Under the
Aliases tab each page has one listed www.WEB1.com for
1 and www.WEB2.com for the second.
Now you type in a browser www.WEB1.com and you get
it. You type in www.WEB2.com and you get nothing.
What am I missing???
You can't add them manually and add them in server admin make up your mind which you want.

Similar Messages

  • 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

  • Need Help with Virtual Host

    a quick Explaination of what I'm trying to do.
    We have a DNS name, "our_intranet.com". This DNS points to a load balancer which routes the call to "our_weblogic_server:7015". When a request with this DNS comes in, we really want to go to our_weblogic_server:7015/portal/site/our_intranet. Can this be acheived using a Virtual Host? And if so, could give an example of creating a virtual host?
    Thanks,
    Tom.

    Thank you James for your reply,
    I do appreciate you taking a moment to respond and include some suggestions. At this point I feel 90% certain that the answer lies within WebLogic configuration somewhere.
    Discoverer is a J2EE application as I understand it and based on that belief it is probably using the standard J2EE servlet API calls such as ServletRequest. getScheme() (the protocol portion of the URL such as http, https, ftp), ServletRequest.getHostname(), and ServletRequest.getPort(). Those API calls return values derived by the server either from the connection itself or from server configuration.
    The URL's being returned by the web application are not static either. Although the protocol and the port never change (always http://...:80/) the server hostname does. If I add an entry to my host file for fred.somewhere.com and then hit the server using that server name then the URL's returned by the web application are http://fred.somewhere.com:80/, and if I use barney.somewhere.com I get a similar result. Now, the web application could be reading the "Host" HTTP header out of the request itself to derive that information but why go through all that trouble when the Servlet API gives you a standard way to do it.
    For this reason I believe Discoverer (the web app causing our grief) is getting this information from WebLogic even though I cannot verify that with absolute certainty. I wish someone from the Disco area could verify that. I have had a support request open with Oracle for over a week but so far they haven't been able to tell me where they get that information from (which I'm sure is just because I'm not speaking with a developer). I may actually in fact pass on this question to the Discoverer forums you suggested. If someone can at least tell me if Discoverer is getting this information from the application server then I can at least pass that along as confirmation to WebLogic folks.
    I have set up an Apache web server as a reverse proxy server for http and https in front of this particular server as an experiment and get similar results with the server name. Whether I hit Apache via http or https I always get back http://servername:80/ from the back-end WLS. The fact is WebLogic isn't even running on port 80 which makes it even more interesting why the URL's we get back should point at 80 instead of the port WLS is listenning on. Since there is no port or protocol information contained within the HTTP request sent by client browsers (only the Host header which just has the hostname) that may have something to do with why the server doesn't know how to provide correct values, but that doesn't explain why it would choose to tell the web application port 80 instead of the port it is actually listening on.
    As far as tracking down how to configure this beast it might be complicated by the fact that I don't think this is just WebLogic Server. This is Fusion Middleware. I didn't think that included Apache HTTP Server, but actually I can see there is a directory for Apache on the server identified as ohs (stands for Oracle HTTP Server). Some of the help in Enterprise Manager (or maybe it was in the WebLogic administration web console) actually talks about Oracle HTTP Server which they say is based on Apache HTTP Server and in fact the configuration files are consistent with Apache. That doesn't mean I don't believe WebLogic folks like yourself that say Apache is not a part of WebLogic server (which seems like a pure Java application) but maybe it is a part of Oracle Fusion Middleware. They might just have it there for other stuff working together with WLS (such as Oracle Web Cache) or for load balancing as you mentioned. If it is there then it might either complicate things, or might provide a possible solution. If it really is running there in front of WLS and we can use some Apache configuration values to override URL information that the server passes on to the web applications maybe it could help. I did see some processes running on the same server with a name something like HTTPD.worker. My Apps DBA's (who are also learning as they go with WLS) said they did zero Apache configuration as part of the install however and I know zero about how (or if) Apache is working together with WLS.
    I tried going down the path of setting up a custom Network Channel and Virtual Host because a) it seemed like a logical place to look and b) I had seen some references to them on the web but as I tried to step through the configuration I admit I never saw any settings that related to protocol overrides. I have seen host and port overrides somewhere along the way but never a protocol override.
    I'm confused that this seems so complicated. I mean, aren't there a lot of people out there running their servers behind a hardware load balancer with SSL termination at the load balancer (it handles the https decryption and then forwards the requests unencrypted to the back-end servers)?
    Your link to the "Corecoreserverserverprotocolshttptitle.html" looks like just the right place (almost). If it only had Frontend Port and Frontend Protocol as well as Frontend Host (and instead of Frontend HTTP Port and Frontend HTTPS Port). So frustrating to be so close but miss. I do appreciate the pointer though.
    Funny that you should bring up the post on WebLogic Wonders because that is actually the example I tried to follow when I attempted to set up a network channel and virtual host. I aborted before the deploy because the deploy wasn't working quite how I expected and I had little confidence it was going to help me at that point (because I hadn't been presented with any setting that allowed me to override the protocol (http/https) value for a front-end system. I'm still not quite sure how the Network Channel works together with the server/domain/virtual host so perhaps I need to do a little more reading.
    If anyone understands exactly what I am trying to achieve though and can give me some direction it would be much appreciated. It seems straight forward to me:
    We have an F5 hardware load-balancer that runs here:
    https://external-servername:443/....
    It uses hardware SSL accelleration to decrypt the incoming request and if it sees /discoverer/ in the URL it then forwards the request unencrypted to a back-end WLS here:
    http://internal-servername:8888/...
    We would be happy if any connection that server recieved it always overrides the scheme (https instead of http), server (external instead of internal...it actually does this properly already), and port (443 instead of 80). In a perfect world it might behave differently if we connect internally directly to the server (in other words if we don't access it through the load balancer then it provides URL information to continue accessing it directly) but that is just icing on the cake which probably would require virtual host configuration to differentiate the two. We'd be ecstatic if we could simply override those values all the time for the entire server to some constant values that we set.
    Thanks,
    Eric R.

  • Problem with DNS and/or Virtual Host (works from inside, not from outside)

    I am running several web sites (as virtual hosts) successfully on one Xserve (192.168.200), which are accessible internally and from the Internet (via forwarding port 80 on our firewall).
    Now I am trying to add another web site (newmini.domain.com), which however is running on a Mac mini (also on the same subnet as the Xserve) at 192.168.100. What I did is make an additional entry under the Xserve's DNS for the domain (domain.com) (+ Machine..., pointing to 192.168.0.100). (I also made the necessary changes to the Mac mini's httpd and hosts configuration--no problem there).
    Now, here's the strange thing: All computers on the subnet, whose DNS points to the Xserve, can see and browse newmini.domain.com fine. No problem. The computers ask the Xserve for the IP of the host in question, the Xserve says, "192.168.100", the request goes to the Mac mini, and it serves the web site as expected.
    But this doesn't happen if the request comes from the Internet. Instead of seeing the Mac mini, the client sees the default web site of the Xserve... So it appears that somewhere, the virtual host part of the HTTP request is lost between our firewall and the Xserve.
    Any ideas? Thanks.

    It's not going to.
    You say you've setup port forwarding on the firewall. Port forwarding only cares about the port number (80). It knows nothing about the nature of the request (e.g. the hostname that the web request is for). Therefore all extenal connections on port 80 get sent to the XServe. The newmini doesn't see the traffic at all.
    If you only have a single public IP address you can only forward port 80 traffic to a single machine. Your options are to either use a different port number, or configure the XServe to proxy the connection to the mini (so now the traffic goes router -> XServe -> Mini -> XServe -> router), although that might not do what you want since it still places load and dependencies on the XServe.

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

  • Use require group in virtual host

    Hi,
    I have set up several virtual hosts in my middle tier, and configured them as partner applications so that OID/SSO can be used for authentication. It works fine, but the only supported method I can see is 'require valid-user' which allows any user in OID access to all virtual hosts. Does anyone know of a way around this using OID (not mod_auth). We want to allow users within a group access to individual virtual hosts.
    Thanks,
    Karen

    Hi there,
    I just wanted to clarify my question, has anyone been able to use group authentication using OID to restrict access to websites hosted using AS10g? My website is just plain html, but maybe someone has done something similar by adding a java wrapper to perform the authentication (that seems like overkill to me but maybe there is a more elegant workaround)?
    Thanks,
    Karen

  • ICal Error: "No virtual host found for iCal Service" - Help!

    Trying to set up iCal on OS X Server 10.5.6
    Server is up and running and successfully providing web services on its FQDN. Server is not currently used to support network users / services, but as and when it does it will be the Master Opendirectory server.
    I have created a couple of test accounts on the server (simply in the Users group) and enabled both for Calendar Access.
    I have provided the details of the FQDN on the iCal page, and checked that the default port (8008) has been opened in the firewall.
    In web services there is one virtual domain (using name based virtual server) and the default domain in operation. Both appear to be functioning as would be expected.
    When I click on 'start service' for iCal, I get this error.
    "No virtual host found for iCal service"
    I cannot find any information about this in iCal manual, or online documentation. Can anyone here provide pointer to where this information is, or what it means?
    Would be most grateful.

    Hey there,
    See if any of the solutions provided in either of these older threads can steer you in the right direction.
    http://discussions.apple.com/thread.jspa?threadID=1201737
    http://discussions.apple.com/thread.jspa?threadID=1242823&start=0&tstart=-3
    B-rock

  • [SOLVED] XAMPP 1.8.0 + virtual hosts = 403 access forbidden

    Hello, all. I am happy migrant from ubuntu to arch, but have problem, which i can't solve myself.
    I need to setup xammp for local development.
    My actions
    Install last xampp from aur
    Run lampp
    Open locahost, there is "xampp welcome page"
    Open localhost/phpmyadmin and get
    xampp new xampp security concept, blablabla
        Okay, add "Require all granted" in httpd-xampp.conf
    <Directory "/opt/lampp/phpmyadmin">
            AllowOverride AuthConfig Limit
            #Order allow,deny
            #Allow from all
            Require all granted
        </Directory>
        phpmyadmin came back
    I need virtual hosts, structure will be
    /home/$USER/Sites/{site1/index.html,site2,site3 etc.}
    Uncomment include vhosts in httpd.conf
    Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
    Clear httpd-vhosts.conf and put there
    <VirtualHost *:80>
            DocumentRoot "/home/shara/Sites/mysite"
            ServerName mysite
            ServerAlias www.mysite
            ErrorLog "/home/shara/Sites/mysite-error_log"
            CustomLog "/home/shara/Sites/mysite-access_log" common
        </VirtualHost>
    Add new host in /etc/hosts
    127.0.0.1 mysite
    Set "User shara" and "Group www" in httpd.conf
    <IfModule unixd_module>
    User shara
    # commented out by lampp compatibility check
    #Group nogroup
    Group www
    </IfModule>
    Add group "groupadd www"
    Add user to group "usermod -aG www shara"
    Change htdocs group "chgrp -R www /opt/lampp/htdocs"
    Change sitedir group "chgrp -R www /home/shara/Sites"
    Change htdocs chmod "chmod 2775 /opt/lampp/htdocs"
    Change sitedir chmod "chmod 2775 /home/shara/Sites"
    Run xampp
    Open "mysite"
    Access forbidden Error 403
    Open "localhost"
    Access forbidden Error 403
    Open "localhost/phpmyadmin"
    Existing configuration file (./config.inc.php) is not readable.
    Oookay
        Set chmod 664 to /opt/lampp/phpmyadmin/config.inc.php
    Open "localhost/phpmyadmin"
        phpmyadmin works, but nothing else
        XAMPP 1.7 worked perfect with this config. Where is the FAIL?
    Last edited by Shara (2012-09-04 12:18:48)

    I did it.
    phpmyadmin new security problem solved with set passwords with /opt/lampp/lampp security (NO require all granted in httpd-xampp.conf)
    virtual hosts 403 problem solved with
    New instruction:
    *User name "shara" and group "www" is myown, you need to set yours
    INSTALL
    yaourt -S xampp
    /opt/lampp/lampp security
    VIRTUAL HOSTS
    Uncomment including vhosts in "/opt/lampp/etc/httpd.conf" and set "User shara" and "Group www"
    Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
    <IfModule unixd_module>
    User shara
    # commented out by lampp compatibility check
    #Group nogroup
    Group www
    </IfModule>
    Clear "/opt/lampp/etc/extra/httpd-vhosts.conf" and add
    <VirtualHost *:80>
            DocumentRoot "/home/shara/Sites/mysite"
            ServerName mysite
            ErrorLog "/home/shara/Sites/mysite/mysite-error.log"
            CustomLog "/home/shara/Sites/mysite/mysite-access.log" common
        <Directory "/home/shara/Sites/mysite">
           Require all granted
        </Directory>
    </VirtualHost>
    Add new host in /etc/hosts
    127.0.0.1 mysite
    Add group
    groupadd www
    Add user to group
    usermod -aG www shara
    Change htdocs group
    chgrp -R www /opt/lampp/htdocs
    Change sitedir group
    chgrp -R www /home/shara/Sites
    Change htdocs chmod
    chmod 2775 /opt/lampp/htdocs
    Change sitedir chmod
    chmod 2775 /home/shara/Sites
    Set phpmyadmin config chmod
    chmod 664 /opt/lampp/phpmyadmin/config.inc.php
    Run lampp
    sudo /opt/lampp/lampp start
    WIN ^_^
    May i need to write archwiki manual?
    Last edited by Shara (2013-02-28 17:07:22)

  • [SOLVED] I can't get virtual hosts working. What's wrong?

    What I've decided to do is try to set up each domain name in the user folder to whom it belongs (for example: /home/username/somedomain.com/htdocs). I can't get it to work though. I keep getting an error saying that there's no index file (although there is) or that the location isn't readable (although it is). I'm trying to make it so that if the domain name matches with a virtual host section in httpd-vhosts.conf that a specific DocumentRoot will be loaded for that domain, etc. But, if the domain name points to my server but doesn't match, then I want the default location to work. I can't seem to make this work.
    This is my http.conf:
    ServerRoot "/etc/httpd"
    Listen 80
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authn_dbm_module modules/mod_authn_dbm.so
    LoadModule authn_anon_module modules/mod_authn_anon.so
    LoadModule authn_dbd_module modules/mod_authn_dbd.so
    LoadModule authn_default_module modules/mod_authn_default.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_user_module modules/mod_authz_user.so
    LoadModule authz_dbm_module modules/mod_authz_dbm.so
    LoadModule authz_owner_module modules/mod_authz_owner.so
    LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
    LoadModule authz_default_module modules/mod_authz_default.so
    LoadModule auth_basic_module modules/mod_auth_basic.so
    LoadModule auth_digest_module modules/mod_auth_digest.so
    LoadModule file_cache_module modules/mod_file_cache.so
    LoadModule cache_module modules/mod_cache.so
    LoadModule disk_cache_module modules/mod_disk_cache.so
    LoadModule mem_cache_module modules/mod_mem_cache.so
    LoadModule dbd_module modules/mod_dbd.so
    LoadModule dumpio_module modules/mod_dumpio.so
    LoadModule reqtimeout_module modules/mod_reqtimeout.so
    LoadModule ext_filter_module modules/mod_ext_filter.so
    LoadModule include_module modules/mod_include.so
    LoadModule filter_module modules/mod_filter.so
    LoadModule substitute_module modules/mod_substitute.so
    LoadModule deflate_module modules/mod_deflate.so
    LoadModule ldap_module modules/mod_ldap.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule log_forensic_module modules/mod_log_forensic.so
    LoadModule logio_module modules/mod_logio.so
    LoadModule env_module modules/mod_env.so
    LoadModule mime_magic_module modules/mod_mime_magic.so
    LoadModule cern_meta_module modules/mod_cern_meta.so
    LoadModule expires_module modules/mod_expires.so
    LoadModule headers_module modules/mod_headers.so
    LoadModule ident_module modules/mod_ident.so
    LoadModule usertrack_module modules/mod_usertrack.so
    LoadModule unique_id_module modules/mod_unique_id.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule version_module modules/mod_version.so
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
    LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    LoadModule ssl_module modules/mod_ssl.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule dav_module modules/mod_dav.so
    LoadModule status_module modules/mod_status.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule info_module modules/mod_info.so
    LoadModule suexec_module modules/mod_suexec.so
    LoadModule cgi_module modules/mod_cgi.so
    LoadModule cgid_module modules/mod_cgid.so
    LoadModule dav_fs_module modules/mod_dav_fs.so
    LoadModule vhost_alias_module modules/mod_vhost_alias.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule imagemap_module modules/mod_imagemap.so
    LoadModule actions_module modules/mod_actions.so
    LoadModule speling_module modules/mod_speling.so
    LoadModule userdir_module modules/mod_userdir.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule rewrite_module modules/mod_rewrite.so
    #CUSTOM
    LoadModule php5_module modules/libphp5.so
    <IfModule !mpm_netware_module>
    <IfModule !mpm_winnt_module>
    User http
    Group http
    </IfModule>
    </IfModule>
    ServerAdmin [email protected]
    DocumentRoot "/srv/http/default/htdocs"
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    </Directory>
    <Directory "/srv/http/default/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    <IfModule dir_module>
    DirectoryIndex index.php,index.html
    </IfModule>
    <FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
    </FilesMatch>
    ErrorLog "/var/log/httpd/error_log"
    LogLevel warn
    <IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
    # You need to enable mod_logio.c to use %I and %O
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "/var/log/httpd/access_log" common
    </IfModule>
    <IfModule alias_module>
    ScriptAlias /cgi-bin/ "/srv/http/cgi-bin/"
    </IfModule>
    <IfModule cgid_module>
    #Scriptsock /var/run/httpd/cgisock
    </IfModule>
    <Directory "/srv/http/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    DefaultType text/plain
    <IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    </IfModule>
    # Multi-language error messages
    Include conf/extra/httpd-multilang-errordoc.conf
    # Fancy directory listings
    Include conf/extra/httpd-autoindex.conf
    # Language settings
    Include conf/extra/httpd-languages.conf
    # User home directories
    #Include conf/extra/httpd-userdir.conf
    # Real-time info on requests and configuration
    #Include conf/extra/httpd-info.conf
    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf
    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf
    # Distributed authoring and versioning (WebDAV)
    #Include conf/extra/httpd-dav.conf
    # Various default settings
    Include conf/extra/httpd-default.conf
    #CUSTOM
    Include conf/extra/php5_module.conf
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    And here's my httpd-vhosts.conf:
    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerName 45.117.5.40
    ServerAdmin [email protected]
    DocumentRoot "/srv/http/default/htdocs"
    ErrorLog "/srv/http/default/log/error_log"
    CustomLog "/srv/http/default/log/access_log" common
    </VirtualHost>
    <VirtualHost *:80>
    ServerName somedomain.com
    ServerName www.somedomain.com
    ServerAdmin [email protected]
    DocumentRoot "/home/normaluser/somedomain.com/htdocs"
    ErrorLog "/home/normaluser/somedomain.com/log/error_log"
    CustomLog "/home/normaluser/somedomain.com/log/access_log" common
    </VirtualHost>
    So, for example, I want it to be so that if I visit http://45.117.5.40 that it'll show the stuff ftom /srv/http/default/htdocs but if the domain name matches somedomain.com then I want the server to show the content from /home/normaluser/somedomain.com/htdocs.
    What currently happens is that if I visit http://45.117.5.40 or somedomain.com, they both show the same content from /srv/http/default/htdocs.
    If I comment out the first VirtualHost section, then everything stops working and I see the default "Access forbidden!" message.
    What am I doing wrong?
    Last edited by trusktr (2012-04-13 06:15:41)

    I fixed it. In case any newbs come across this, I had to add a new <Directory> section for the DocumentRoot of the virtual host. Simply adding the VirtualHost entry in the vhosts file isn't enough.
    For example, for the "somedomain.com" vhost in the example above to work, I added this to http.conf:
    #This must match with the same location as DocumentRoot in httpd-vhost.conf.
    <Directory "/home/normaluser/somedomain.com/htdocs">
    #Put whatever directives you want in here
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    Let me know if you need any clarification.
    Last edited by trusktr (2012-04-13 06:16:02)

  • Working with virtual host & hosts files on a local network

    I'm setting up a small local web and production server here in my office running Leopard.
    I'm setting up virtual hosts for users on the network to review and comment on websites in development. Ideally they'd access it as:
    host1.webserver.local
    host2.webserver.local
    host3.webserver.local
    Problem is, users on the network can see webserver.local just fine, but the subdomains need to be registered with hosts file on each computer.
    Is there a way I can manage all computers hosts file easily? I was thinking of an SVN repository, but this still requires going to each computer to update the file.
    Any suggestions here would be great.
    Thanks
    Rich

    Hi jscher2000
    Thank you for your interest.
    I am using "manual prxoy configuration" option in firefox with port 8080. I have tried the option of "Use system proxy settings" but it doesn't help.

  • The essential guide to DW cs4... by D. Powers: when from wamp to xampp+virtual host and having problems :(

    Following the book in chapter 2 I think Ivé followed everything correctly, but have encluded all the things I've edited below.
    I was using wamp with no problems but after trying to set up a virtual host and now using xampp im abit lost its probabsomething stupid but I can find the prob.
    (This post is abit long and dragged out so I used some colour to try ease the reading..)
    When I try to view a dynamic page in live view or in firefox I get the following error:
    **when using:
    <VirtualHost *:80>
    DocumentRoot c:/xampp/htdocs
    ServerName localhost
    </VirtualHost>
    result:
    Access forbidden!
    You don't have permission to access the requested object.     It is either read-protected or not readable by the server.
    If you think this is a server error, please contact the webmaster.
    Error 403
    thegoodlife
    2009/10/13 12:47:48 PM
    Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
    *when using:
    <VirtualHost *:80>
    DocumentRoot c:/htdocs
    ServerName localhost
    </VirtualHost>
    result:
    Object not found!
    The requested URL was not found on this server.          If you entered the URL manually please check your     spelling and try again.
    If you think this is a server error, please contact the webmaster.
    Error 404
    thegoodlife
    2009/10/13 12:32:58 PM
    Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
    This is what I've done, blue indicating where I have or was meant to edit, red being the relivant context. (hope it helps )
    1. Created a new folder called htdocs (C:\htdocs)
    2. Changed the pathname to:
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot "C:/htdocs"
    and
    # This should be changed to whatever you set DocumentRoot to.
    <Directory "C:/htdocs">
    3. Created vhosts folder; with a sub-folder called thegoodlife (C:\vhosts)
    4. entered new vhost:
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    # For example:
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    127.0.0.1 localhost
    127.0.0.1 dwcs4
    127.0.0.1 thegoodlife
    127.0.0.1 bin.errorprotector.com ## added by CiD
    5.It says uncomment the command by removing the #, (Supplemental configuation.), but this is the origional file; already uncommented?
    # Real-time info on requests and configuration
    Include "conf/extra/httpd-info.conf"
    # Virtual hosts
    Include "conf/extra/httpd-vhosts.conf"
    # Distributed authoring and versioning (WebDAV)
    Include "conf/extra/httpd-dav.conf"
    6.Set the permissions and changed the code as instructed, unsing (c:/xampp/htdocs) as advised.
    # You may use the command line option '-S' to verify your virtual host
    # configuration.
    <Directory C:/vhosts>
      Order Deny,Allow
      Allow from all
    </Directory>
    # Use name-based virtual hosting.
    ##NameVirtualHost *:80
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for all requests that do not
    # match a ServerName or ServerAlias in any <VirtualHost> block.
    <VirtualHost *:80>
    DocumentRoot c:/xampp/htdocs
    ServerName localhost
    </VirtualHost>
    <VirtualHost *:80>
    DocumentRoot c:/vhosts/dwcs4
    ServerName dwcs4
    </VirtualHost>
    <VirtualHost *:80>
    DocumentRoot c:/vhosts/thegoodlife
    ServerName thegoodlife
    </VirtualHost>
    Then creating the site definition:
    local root forlder: C:\htdocs\thegoodlife\
    testing server folder: C:\vhosts\thegoodlife\
    URL prefix: http://thegoodlife/
    hope i've covered all area's where I could have gone wrong

    Just one more thing - the description of what i did while first Kernel appeared:
    Happened 2 days ago. Wasn't turning it off for like a day, only sleep mode by closing it. Worked fine all day, wasn't doing anything, except for checking mail 2-3 times and having windows 7 virtual machine opened but doing nothing, everything was going fine. Then closed it without turning off.
    Opened 3-4 hours later, everything was working fine for 30 minutes of checking mail, then Kernel appeared. After that pretty much everything i did is described in part 1-5.
    Note: all the time MBP was connected to internet via wifi, so updates to both MBP and virtual machine of all programs were possible.
    I only shared downloads and desktop folders, so windows couldn't have access to system folder of Mac Os.
    Hope this might help...Thanks again.

  • 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

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

  • Hiding the Port in a Virtual Host/Server-name Alias

    I need some guidance/help with the HTTP Server in AS 10g. We have several new Portal sites with a mix of forms, reports, and pl/sql server pages. We wish to make these services available from the internet via an aliased hole in the firewall.
    We have our public alias of Alias.CompanyWebsite.com mapped to the server-name, but we'd like to get the alias mapped to servername:port. I've tried to get this set up using virtual hosts in the HTTP server, but I'm having no luck. I'm also having trouble finding documentation on how to this.
    Is there a way to hide the server-name and port number via a virtual host (alias) in HTTP Server and/or Web Cache? If so, how do you accomplish this?
    Thanks,
    Josh

    Usually it is like this:
    outside name: www.acme.com
    oudside port: 80
    inside name: inside.acme.local
    inside port: 7778 (if you have a seperate machine for the middle tier)
    In the Webcache you'll need a site
    www.acme.com with port 80
    and an origin server
    inside.acme.local with port 7778
    Then create a site-to-server mapping from www.acme.com to inside.acme.local
    If your firewall listens to another name or does something with the ports you need to change the site accordingly.
    cu
    Andreas

  • Publish Abap Web Service in ICF virtual host

    Hello
    We have configured our abap aplication server with two virtual host in SICF
    one the default_host that listen in http 8080 port and other virtual host that
    listen in http 8090 port.
    We need define some ABAP web services that listen in default_host:8080  and other virtual host in virtualhost2:8090.
    We define de web service with SE80 wizard and then create the configuration end point
    with SOAMANAGER.
    Our problem is that soamanager ever create the entrie of endpoint in sicf transaction, under default_host:8080 service tree not under virtualhost2 service tree. and so we can not call
    the web service like http://virtualhost2:8090/sap/bc.... because don't exist, only exist
    http://defaul_host:8080/sap/bc....
    we try to copy the entry of the tree under virtualhost2 in the proper place of the tree,
    but when call the webservice with soaui the system report the error:
         No Web service configuration for this access path: ""
    i can see that there are entries in the table SRT_CFG_SRV_ASGN that are related with this
    problem, because assign the url of the endpoint of the ws to virtual host, but i don't
    know how the system generate this entries.
    someone know how call ABAP web service with icf virtual host?
    thanks
    regards
    diego

    Hi Trevor
    For test purpose i can do it works.
    The key point is create the proper entry in the table SRT_CFG_SRV_ASGN that refer to the correct VIRTUAL_HOST.
    When you genreate the endpoint of the service with soamanager, the system generate an entrty in this table with the fiel VIRTUAL_HOST = 0, you can copy this entry and change only two fields.
    VIRTUAL_HOST = <the number of your virtual host>
    HASH --> you can calculate this field with the FM CALCULATE_HASH_FOR_CHAR, in the parameter DATA contatenate the content of the fiels VIRTUAL_HOST and URL (be careful with the upercase), this function module return you the hash.
    (First you have to replicate the icf tree that soamanager create under your virtual host tree)
    With this configuration i can call to my WS over the virtaual host, using soaui.
    I hope this can be useful for you.
    Regards
    diego

Maybe you are looking for

  • How can you connect to MS SQL Server through Oracle 9i?

    i.e. we want to connect through a stored procedure and NOT a form. Our live DB is still in 9i.

  • Working on Localization - Decimal and Comma 'Decimal' Seperators

    Note: SQL Server 2008 (Do not have the PARSE and TRY_PARSE functions available from 2012.) Hello, I am currently working on a project to offer a localization of an existing product to other languages. This means I, unfortunately, have no say in how t

  • Updating the firmware on my Pana HVX200

    I'm hoping to shoot with a 16gig P2 card and realized I need a firmware upgrade for my camera. The Panasonic site is very confusing on exactly what I need to download and how to install? Any help would be greatly appreciated. Thanks

  • Addition of 2 integer

    Hi All, I am very new to Oracle BPM 11g. I want to add two integers, and these two number should come as user input. for that I need one UI. can anybody please let me know what are the steps for that, or if is there any useful link please send me. Th

  • IMovie 9.0.9 won't start but hangs in Mavericks

    I am testing out Mavericks and have installed it without problem (over Snow Leopard boot partition clones) on 2 machines, a 2010 Mac Mini and a 2007 MackbookPro.  I was using iMovie 9.0.4 on both and can still do so since I have kept Snow Leopard boo