Apache: sharing assets between virtual hosts best practise
Hello,
We've got a few virtual hosts on our server that share certain assets. I'm looking for a the best way to accomplish this. If it were just me I would use Alias directives, but I would like it to be as transparent as possible for our web designer. Years ago we use to do this with WebStar by sharing one document root. But there's no excuse for that these days.
Here are some of the ideas I'm considering:
1. Put hard links to each shared directory in the document root of each virtual host and not bother with Alias directives.
2. Same as above but include corresponding aliases in the server's config.
3. Same as 1 and 2, but use symbolic links instead of hard links. Not sure about this option since the ftp client will know they are links. But maybe that doesn't matter(?).
Thanks for any thoughts.
Cole
orangekay wrote:
I don't understand what kind of "transparency" your designer requires. It shouldn't make any difference where the files live so long as they're accessible.
The designer will likely not understand that shared assets will not actually be stored in the document root, but in another directory all together. Then I say, "Well don't worry. Just pretend they're in your document root. The server will find them because of the Alias directives I've added to Apache's configuration."
I'm trying to avoid this conversation. I work with artists and programmers. Part of my job requires finding common ground between peoples' various technical skill sets.
I'll try symlinks and Aliases. After reading the ln man page again I see: "Hard links may not normally refer to directories and may not span file systems."
Cole
Similar Messages
-
Transferring data between two tables - Best practise advice
Hi!
I need advice on best practise since I am new to abap-thinking.
I have two tables. I am going to transfer data from table1 and update the corresponding master data table with the data in table1.
Which is the best way of doing this? The data amount that can be transferred is maximum 300 000 rows in table1.
I can only think in one, the simple, way which is to read all the rows in to an internal table and then do an update on all the rows in the master data table.
Is there a better way of doing this?
thanks in advance,
regards
BaranHi!
1. The update will be done a couple of times per week.
2. Yes, the fields are the same.
3. Both tables are SAP dictionary tables. One is a staging table and the other is master data table. Our problem is that we want a custom field to a standard master data table. We add an extra field to the staging table and the same to the corresponding master data table but the standard API is not supporting the transfer of data between custom fields so we are developing our own code to do this.
After some standard code has transferred the standard fields from staging tables to master data tables we are going to transfer our field by updating all the rows in the standard table
thanks
regards
Baran -
Hello,
I have an web application that runs perfectly in Tomcat 5.5 when running tomcat stand-alone.
I also have Apache HTTP server integrated with Tomcat using the jk connector and running virtual hosts in a mod_jk.conf file, which is working for html files. When I run apache and tomcat at the same time, the jsp opens but the servlet cannot get a database connection.
To run virtual hosts and apache and tomcat, I added this host container to server.xml:
<Host name="www.mydomain.com" debug="0" appBase="d:/WebApps/mydomain"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="" debug="0"/>
</Host>
Does anybody see anything wrong with this? Is there some reason why the context.xml (which contains the database info) is not being read?
Any suggestions are greatly appreciated.
Thank you,
LoganHi,
In the docmentation of Tomcat 5.x is written that is not recommended to put <context> element in the server.xml file. Create a file in CATALINA_HOME/conf/Catalina/www.mydomain.com/ with an XML extension. For example context.xml. In files like this you should write all of your <context> elements. -
Apache mod_rewrite, htaccess and virtual host
Does not appear that the htaccess file is doing anything at all; I tested with a 301 redirect and even put some random nonsense in it in hopes to provoke a server error and nothing.
httpd.conf : http://pastebin.com/36qFCg5q
httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "/Users/jwindhall/Railo/tomcat/webapps/ROOT/dentist_app"
ServerName xxx.com
ServerAlias www.xxx.com
<Directory "/Users/jwindhall/Railo/tomcat/webapps/ROOT/dentist_app">
Options All Includes Indexes
Order allow,deny
Allow from all
AllowOverride All
</Directory>
ProxyRequests Off
<Proxy *>
Options All Includes Indexes
Order allow,deny
Allow from all
AllowOverride All
</Proxy>
ProxyPass / http://www.xxx.com:8080/
ProxyPassReverse / http://www.xxx.com:8080/
</VirtualHost>
jwindhall.conf:
<Directory "/Users/jwindhall/Railo/tomcat/webapps/ROOT/dentist_app">
Options Indexes MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>The question etresoft was asking was around what goal or end or configuration you were trying to achieve here, and not who you might be. With some background on the problem and on the particular goal, we might be able to provide you with a more direct solution, or debug the error.
It looks like you're trying to run some Tomcat stuff. Something like this?
Though that articile doesn't indicate it, the provided set-up there looks to be specific to OS X client. Are you running OS X Server, or OS X client. And in either case, which version? (The management user interfaces do vary here, both by client and server, and by version.)
The article also looks to be for 10.6 or earlier, or it presumes that you have Java installed. That's not the default, so that's something you'll need to establish.
Apache redirects do work on OS X and OS X Server. If you're just testing that, get rid of Java and Tomcat and the rest (from your configuration test) and test just the URL redirects.
Apache is also sensitive to file protections and ownerships, as it strives to avoid allowing an attacker at your whole system (by default), though those protections can be overridden.
As a first step toward troubleshooting your current configuration, invoke the Apache configuration test on your system and see if it tosses any errors, and also check the Apache server logs for relevant errors. The logs are usually in the /var/log/apache2 directory, though that can be changed. This'll make sure the core giblets are working. The next steps would usually then involve checking the protections on the web directories, and then testing Java and Tomcat individually.
OS X Server is a little more simple to set up and (mostly) avoids needing to access the configuration files, and the directories and related are IMO a little easier to deal with; you're using Server Admin.app or Server.app (depending on the OS X Server version) to manage all that, and not a text editor.
And you may already be aware of this; do not try to use a GUI editor to edit the configuration files. TextWrangler will work here, but most other GUI editors won't. Using a command-line editor is more common; nano or vim or emacs or such. FWIW. -
Is there a way to store and access shared assets between HTML overlays in a Folio?
I'm using numerous HTML graphics throughout a folio, each one requiring common script and font files. Rather than store these assets in each graphic set within a folio's HTML overlay, is it possible to store them in a root folder in the folio that is then accessible to any HTML overlays used throughout it? And if it possible, how would I access them?
This would save a great deal on overall folio size. Though I suspect it's not possible, I'd find it a useful feature if it were somehow possible to implement it in the future.
Thanks,
Brice.http://helpx.adobe.com/digital-publishing-suite/help/import-htmlresources.html
-
Apache, name based virtual hosts and multiple servers.
Hi,
Ive been playing with Apache and name-based virtual hosts for a while now, but, ive been doing it with one single server... now i have the need to forward a name-based request to another server inside the intranet (wich doesnt have a public IP, but a private)...
Something like this:
internet -----> Webserver (name based vhosts) ----> intranet-webserver
Where "webserver" has several domains resolved via name based virtual hosting, and one of those needs to be redirected (or forwarded) to another server on the LAN.
Any ideas on how to do this? i tryed searching the web, but i dont know under which keywords, so i always end on single server virtual hosting help sites.
thanks in advance!you need to define a virtual server for it..but inside that definition.. define a proxy.
Then the middle webserver, will actually handle the request to the intranet server, on behalf of the internet client..and then pass the traffic to the internet client.
this looks like a reasonable example..
http://www.linuxfocus.org/English/March … le147.html
namely, the section "Mapping Virtual Servers" -
Virtual Hosts in Apache HTTP Server
How to configure virtual hosts in Apache HTTP Server httpd.conf file.
If I want to access my server with some other name(alias), how can I do this ?
Suggestions in this matter would be highly helpful.
Thanks
Vidhyut AroraFollowing is a note explaining how to setup
Virtual hosts.
Hope this helps
Ranga
Note:70647.1
Subject: Apache Server Virtual Hosting
Last Revision Date: 07-JUN-2001
PURPOSE
This document discusses considerations for setting up virtual hosts on an
Apache machine, to include how to get the hostname working and how to
configure Apache.
SCOPE & APPLICATION
The information in this document is intended for those who manage multiple sites
using an Apache machine.
REFERENCES
First published in Apache Week issue 31 (6th September 1996)
Last update 20th September 1998
Using Virtual Hosts
Virtual Hosts let you run multiple independent Web sites on a single host with
a single Apache setup.
One of the most important facilities in Apache is its ability to run virtual
hosts. This is now the essential way to run multiple Web services - each with
different host names and URLs - that appear to be completely separate sites.
This is widely used by ISPs, hosting sites and content providers who need to
manage multiple sites but do not want to buy a new machine for each one.
Picking an IP address
There are two types of virtual hosts: IP-based and non-IP-based. The former is
where each virtual host has its own IP address. You must have a new IP address
for each virtual host you want to set up, either from your existing allocation
or by obtaining more from your service provider. When you have extra IP
addresses, you tell your machine to handle them. On some operating systems, you
can give a single ethernet interface multiple addresses (typically with an
fconfig alias command). On other systems, you must have a different
physical interface for each IP address (typically by buying extra ethernet
cards).
IP addresses are a resource that costs money and are increasingly difficult to
get, so modern browsers can now also use 'non-IP' virtual hosts. This
lets you use the same IP address for multiple host names. When the server
receives an incoming Web connection, it does not know the hostname that was used
in the URL. However, the new HTTP/1.1 specification adds a facility where the
browser must tell the server the hostname it is using, on the Host: header. If
an older browser connects to a non-IP virtual host, it does not send the Host:
header, so the server must respond with a list of possible virtual
hosts. Apache provides some help for configuring a site for both old and new
browsers.
Picking a Hostname and Updating the DNS
Having selected an IP address, the next stage is to update the DNS so that
browsers can convert the hostname into the right address. The DNS is the system
that every machine connected to the internet uses to find the IP address of host
names. If your hostname is not in the DNS, no one can connect to
your server (except by the unfriendly IP address).
If the virtual hostname you are going to use is under your existing domain,
you can just add the record into your own DNS server. If the virtual hostname
is in someone else's domain, you must get them to add it to their DNS
server files. In some cases, you want to use a domain not yet used on the
internet, in which case you must apply for the domain name from the
InterNIC and set up the primary and secondary DNS servers for it, before adding
the entry for your virtual host.
In any of these cases, the entry you need to add to the DNS is an address record
(an A record) pointing to the appropriate IP address. For example, say you want
the domain www.my-dom.com to access your host with IP address 10.1.2.3: you
must add the following line to the DNS zone file for my-dom.com:
www A 10.1.2.3
Now, users can enter http://www.my-dom.com/ as a URL in their browsers and get
to your Web server. However, it will return the same information as if the
machine's original hostname had been used. So, the final stage is to tell Apache
how to respond differently to the different addresses.
How Apache Handles Virtual Hosts
Configuring Apache for virtual hosts is a two-stage process. First, it needs
to be told which IP addresses (and ports) to listen to for incoming Web
connections. By default, Apache listens to port 80 on all IP addresses of the
local machine, and this is often sufficient. If you have a more complex
requirement, such as listening on various port numbers, or only to specific IP
addresses, then the BindAddress or Listen directives can be used.
Second, having accepted an incoming Web connection, the server must be
configured to handle the request differently, depending on what virtual host it
was addressed to. This usually involves configuring Apache to use a different
DocumentRoot.
Telling Apache Which Addresses to Listen To
If you are happy for Apache to listen to all local IP addresses on the port
specified by the Port directive, you can skip this section. However, there are
some cases where you want to use the directives explained here:
- If you have many IP addresses on the machine but only want to run a Web
server on some of them
- If one or more of your virtual hosts is on a different port
- If you want to run multiple copies of the Apache server serving different virtual
hosts
There are two ways of telling Apache what addresses and ports to listen to:
- Use the BindAddress directive to specify a single address or port
- Use the Listen directive to any number of specific addresses or ports
For example, if you run your main server on IP address 10.1.2.3 port 80, and a
virtual host on IP 10.1.2.4 port 8000, you would use:
Listen 10.1.2.3:80
Listen 10.1.2.4:8000
Listen and BindAddress are documented on the Apache site.
Configuring the Virtual Hosts
Having gotten Apache to listen to the appropriate IP addresses and ports, the
final stage is to configure the server to behave differently for requests on
each of the different addresses. This is done using <VirtualHost> sections in
the configuration files, normally in httpd.conf.
A typical (but minimal) virtual host configuration looks like this:
<VirtualHost 10.1.2.3>
DocumentRoot /www/vhost1
ServerName www.my-dom.com
</VirtualHost>
This should be placed in the httpd.conf file. You replace the text
10.1.2.3 with one of your virtual host IP addresses. If you want to specify a
port as well, follow the IP address with a colon and the port number
(example: 10.1.2.4:8000). If omitted, the port defaults to 80.
If no <VirtualHost> sections are given in the configuration files, Apache
treats requests from the different addresses and ports identically. In terms of
setting up virtual hosts, we call the default behavior the main server
configuration. Unless overridden by <VirtualHost> sections, the main server
behaviour is inherited by all the virtual hosts. When configuring virtual
hosts, you must decide what changes to make in each of the virtual
host configurations.
Any directives inside a <VirtualHost> section apply to just that virtual host.
The directives either override the configuration give in the main server, or
supplement it, depending on the directive. For example, the DocumentRoot
directive in a <VirtualHost> section overrides the main server's DocumentRoot,
while AddType supplements the main server's mime types.
Now, when a request arrives, Apache uses the IP address and port it arrived on
to find a matching virtual host configuration. If no virtual host matches the
address and port, it is handled by the main server configuration. If it does
match a virtual host address, Apache uses the configuration of that virtual
server to handle the request.
For the example above, the server configuration used is the same as the
main server, except that the DocumentRoot is /www/vhost1, and the
ServerName is www.my-dom.com. Directives commonly set in <VirtualHost>
sections are DocumentRoot, ServerName, ErrorLog and TransferLog. Directives
that deal with handling requests and resources are valid inside <VirtualHost>
sections. However, some directives are not valid inside <VirtualHost> sections,
including BindAddress, StartSevers, Listen, Group and User.
You can have as many <VirtualHost> sections as you want. You can
leave one or more of your virtual hosts being handled by the main server, or
have a <VirtualHost> for every available address and port, and leave the main
server with no requests to handle.
VirtualHost sections for non-IP Virtual Hosts
Non-IP virtual hosts are configured in a very similar way. The IP address that
the requests arrive on is given in the <VirtualHost> directive, and the
host name is put in the ServerName directive. The difference is that there
(usually) is more than one <VirtualHost> section handling the same IP address.
For Apache to know whether a request arriving on a particular IP
address is supposed to be a name-based requests, the NameVirtualHost directive
addresses for name-based requests. A virtual host can handle more than one
non-IP hostname by using the ServerAlias directive, in addition to the
ServerName.
null -
Apache, virtual hosts & cgi-bin
Hello all,
I have an AL server running apache, qmail, vpopmail (&mysql), bincimap, squirrelmail.
I've setup apache to have 2 virtual hosts :
www.mydomain.com (with docroot /home/httpd/html/www.mydomain.com) as http & mail.mydomain.com (with docroot /home/httpd/html/mail.mydomain.com) as https.
Everything is working fine so far, except when I ask for http://mail.mydomain.com (not https) it shows the contents of www.mydomain.com. Minor annoyance, but I'd like to fix it some time. Any suggestions ?
My main problem is that I want to install qmailadmin in mail.mydomain.com, so I can access it via ssl, so I installed it as /home/httpd/cgi-bin/qmailadmin & made a symlink to /home/httpd/html/mail.mydomain.com/cgi-bin.
When I try to access it (https://mail.mydomain.com/cgi-bin/qmailadmin), I get "500 Internal server error" & in error_log:
[error] [client MY_IP] Premature end of script headers: qmailadmin
and in ssl_request_log :
[14/Jan/2004:17:00:45 +0200] MY_IP TLSv1 RC4-MD5 "GET /cgi-bin/qmailadmin HTTP/1.1" 674
I've never setup cgi-bin in virtual hosts before & it's driving me nuts, any suggestions ?
btw, qmailadmin works fine on my home server without any virtual hosts in apache...This isn't perfect, but it's probably pretty close to what you're looking for. You may need to play around with some <Directory/> tags for your cgi-bin directory, or (as the example illustrates below), just put your cgi scripts in the document root for mail.mydomain.com.
<Directory "/home/httpd/html/www.mydomain.com">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/home/httpd/html/mail.mydomain.com">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
NameVirtualHost 192.168.1.114:80
NameVirtualHost 192.168.1.114:443
<VirtualHost www.mydomain.com:80>
SSLDisable
Servername www.mydomain.com
ServerAdmin [email protected]
DocumentRoot /home/httpd/html/www.mydomain.com
DirectoryIndex index.html index.htm index.cgi
ErrorLog logs/www.mydomain.com_error.log
CustomLog logs/www.mydomain.com_access.log combined
</Virtualhost>
# redirect 80 to 443
<VirtualHost mail.mydomain.com:80>
SSLDisable
Servername mail.mydomain.com
Redirect / https://mail.mydomain.com
</Virtualhost>
<VirtualHost mail.mydomain.com:443>
SSLEnable
SSLCertificateFile /home/httpd/conf/mail.mydomain.com.pem
ServerName mail.mydomain.com
ServerAdmin [email protected]
DocumentRoot /home/httpd/html/mail.mydomain.com
ErrorLog logs/mail.mydomain.com_error.log
CustomLog logs/mail.mydomain.com_access.log combined
</Virtualhost>
hth,
farphel -
Using SSL with Apache Virtual Hosts
I am configuring Apache to use 3 virtual Host(Named base virtual Host).
I would like to run SSL on two of the 3 virtual host.
Do I need to gen a certificate for each virtual host or can I just use 1?William,
I thought I'd give my 2 cents on this...
Is there any particular reason as to why you are using named based virtual hosts?
Apache recommends using IP based virtual hosts over name based virtual hosts.
Go to http://httpd.apache.org/docs/dns-caveats.html and read the discussion on IP based virtual hosts and name based virtual hosts. The document describes the drawbacks to using the name-based approach.
Hope this helps!
-Manjeet -
Relationship btwn Virtual Host Services for Groups AND WorkGroup manager??
Can someone please explain the relationship between Virtual Host Services (as specified in the Sites section of Server Admin) AND "Enable the following services for this group on ... and the options"?
And where does one go to "create wikis on this site" when one is give the authority to do it in Server Admin > Sites > Services for Groups (Allow the following to create wikis on this site)?*
Finally, why do all my groups seem to show up on all my virtual hosts, even though they are only enabled on a particular site?
Thanks in advance for any assistance. Hopefully any answers will help others with their efforts to understand this set-up.
Cheers,
Ashley.
* I'm assuming they mean actually create new wikis rather than just add pages to the current one.Thanks Angus, I see that error too.
I understand that Virtual Sites are web-related Apache settings. So, I guess the "Services for Groups" functionality there-in (Sites > Web Services) is just to indicate that this virtual site can have wikis, calendars, blogs etc.
I also understand what a Group is but I am confused as to how they relate to wikis (especially when the config item (Sites > Web Services again) says "allow the following to create wikis (plural) on this site" - my emphasis).
Is it saying that from all the users/groups only the following users/groups can turn on a wiki which will run on this virtual site? For me it sounded like a user/grous could create multiple wikis. So I would like to know if wikis are one-to-one with users/groups?
Cheers,
Ashley. -
Virtual Host creation question - the movie
No answers, so I'm reposting....
I have two systems - "A" and "B", where "A" is the
development system, and
"B" is the php/Apache host. I'd like to have virtual servers
configured
that point back into the local sites on "A", but serve from
"B".
So, I edit A's hosts file to contain this -
192.168.1.80 phphost
(that's B's ip address)
which works pretty well. Now, when I enter ''
http://phphost'' from "A", I
get the Apache default page. Then, on "B", I edit the Apache
config file to
enable virtual hosts, and add this line -
<VirtualHost *:80>
DocumentRoot "192.168.1.101/Documents and Settings/Murray R.
Summers/My
Documents/SCInc/wildimages/site2/"
ServerName wild2
</VirtualHost>
(where 192.168.1.102 is the IP for "A")
but that's not working. Can anyone tell me whether this
scheme can work,
and if so, where my mistake might be?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================> Trying that now.
No workie.... 8(
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Murray *ACE*" <[email protected]> wrote
in message
news:[email protected]...
>> o Has the full drive on machine A been shared out?
Otherwise, I'm not
>> sure that path will work. Otherwise, you'd use
\\192.168.1.101
>> \sharename1:
>
> Yes, it has.
>
>> o Why do you want to do this to yourself? Just
upload like you would to
>> any other server.
>
> I want to test locally.
>
>> o On machine B, map a drive letter to the network
resource, then:
>>
>> <VirtualHost *:80>
>> DocumentRoot "k:\"
>> ServerName wild2
>> </VirtualHost>
>
> Trying that now.
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.dreamweavermx-templates.com
- Template Triage!
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> ==================
>
>
> "Joe Makowiec" <[email protected]> wrote in
message
>
news:[email protected]...
>> On Thu 22 Jun 2006 12:14:09p, Murray *ACE* wrote in
>> macromedia.dreamweaver.appdev:
>>
>>> There are two machines - both WXPPro.
>>>
>>> Machine A is 192.168.1.101.
>>> Machine B is running PHP/Apache
>>>
>>> I want the virtual host for the apache
installation on machine B to
>>> direct me back to the root folder of the site on
machine A.
>>
>> Gotcha. Just throwing things out here and seeing if
something will
>> stick:
>>
>> o \\192.168.1.101\docume~1\...\whatever
>>
>> o Has the full drive on machine A been shared out?
Otherwise, I'm not
>> sure that path will work. Otherwise, you'd use
\\192.168.1.101
>> \sharename1:
>>
>> <VirtualHost *:80>
>> DocumentRoot "\\192.168.1.101\wildimages\site2\"
>> ServerName wild2
>> </VirtualHost>
>>
>> (Note: I'm guessing here on the direction of the
slashes. It's so much
>> easier in the *nix world - everything goes /)
>>
>> o On machine B, map a drive letter to the network
resource, then:
>>
>> <VirtualHost *:80>
>> DocumentRoot "k:\"
>> ServerName wild2
>> </VirtualHost>
>>
>> o Why do you want to do this to yourself? Just
upload like you would to
>> any other server.
>
> -
Apache-weblogic bridge problems with virtual hosting
Hi,
Can we set apache-weblogic bridge where apache webserver is configured
as virtual hosts and each Virtual Host is mapped to a WebLogic server
instance running on separate port ?
Please provide doc or reference or your comments if you have solved this
problem
Thanks
ShriniwasThe above comments notwithstanding, there's one outstanding line in your post that seems crucial:
Also if I type on my browser the name of another secondary (or virtual) domain name in the form http://domain2.com it brings the website hosted under the primary domain which is domain1.com. In case I type http://www.domain2.com than it works as it should and displays the website hosted under this domain name.
As far as Apache is concerned, 'domain2.com' and 'www.domain2.com' are completely separate entities. They have to be otherwise if all domain2.com traffic went to this site you'd never be able to host different sites within the domain (e.g. blogs.domain2.com, wiki.domain2.com, blah.domain2.com, etc.). In other words, there is no automatic relationship between a hostname and sub-records of that hostname.
So what's happening here is Apache is seeing a request for 'domain2.com' which does not match any of its configured virtual hosts, so it handles the request via the default site. If you request www.domain2.com this matches your virtual host configuration so Apache serves the alternate content.
The fix is simple - trivial, even - you just need to tell Apache all the hostnames that match this site - in this case if you've configured the site's primary address as 'www.domain2.com' and you want it to also respond to requests to 'domain2.com' then add 'domain2.com' to the list of Server Aliases in Server Admin. -
Help with apache and virtual hosts
I hope someone can help me I had installed shared point for testing and learning it. I had setup alternative mapping and know I want to add sub domain to my Apache web server. So I have sub domain redirecting back to share point. Also mine website is being redirected to share point. How I can have sub domain redirected to share point and main website go to my drupal ? I had created virtual host for main website but I still get redirected to share point.
I have this and the problem is that main domain goes to share point.
<VirtualHost xxxx.us:80>
ServerName xxxx.us
ServerAlias www.xxxx.us
DocumentRoot "/srv/http"
ServerAdmin [email protected]
ErrorLog "/var/log/httpd/error_log"
CustomLog "/var/log/httpd/access_log" common
<Directory />
Options FollowSymLinks
AddHandler cgi-script .cgi .pl
Options ExecCGI Indexes FollowSymLinks MultiViews +Includes
AllowOverride None
Order deny,allow
Deny from all
</Directory>
</VirtualHost>
<VirtualHost sharepoint.xxxx.us:80>
ServerName sharepoint.xxxx.us
ServerAlias sharepoint.xxxx.us
DocumentRoot "/srv/http"
ServerAdmin [email protected]
ErrorLog "/var/log/httpd/error_log"
CustomLog "/var/log/httpd/access_log" common
RewriteEngine On
RewriteLog "/var/log/httpd/rewrite_log"
RewriteLogLevel 9
RewriteCond %{HTTP_HOST} !^(sharepoint\.)?hebe\.us$
RewriteRule ^(.*)$ http://hebe.us$1 [L,R=301]
ProxyRequests On
ProxyPreserveHost On
ProxyVia full
ProxyPass / http://192.168.0.38/
ProxyPassReverse / http://192.168.0.38/
</VirtualHost>
Last edited by tritron4 (2013-06-19 17:01:08) -
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,
EamonWeb 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). -
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 Schutthttpd.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
Maybe you are looking for
-
I need to edit some videos, and for some reason iMovie says "Quartz Extreme required." and below "iMovie requires a graphics card that is compatible with Quartz Extreme. One or more of your graphics cards does not support Quartz Extreme." and the onl
-
QM - Dynamic Modification Rules Exit QDSE0003
Hello QM masters, I have a requirement on the quality inspection on the goods receipt. The requirement is that some materials have 2 types of inspection and one should be executed every receipt and the other only one per vendors batch. In this contex
-
Use of pdfSource in Interactive Forms in webdynpro
hi, please let me know the use of "<b>pdfSource</b>" property while designing the Interactive form in webdynpro. i tried with and without creating the pdfSource property in my application and still there were no errors while deploying it. Thanks Rega
-
Has anyone had issues with iPhone 5 on wifi, mines keeps dropping the wifi signal.
Has anyone else experience this issue?
-
Can't search on iOS 6 appstore
This just started today. Using iOS6 iPhone4 No app restrictions on the iPhone When searching on the AppStore app the circle spins but I get no results. No Message. The screen is white with the search bar on the top. I can see and install apps using t