Re: [newbie] Virtual Hosts in Apache 2.0
On Sat, Aug 16, 2003 at 09:04:23AM -0400, Todd Slater wrote: On Sat, Aug 16, 2003 at 11:17:34AM +, Roland Cruse wrote: On Sat, Aug 16, 2003 at 01:12:09AM -0400, HaywireMac wrote: BTW, what's with yer blank reply-to, that's kinda weird... I never paid attention to it till now. I've inserted it by hand in this email. I'am using mutt and when I reply to mail it leaves it blank I also tried with evolution and it also leaves the Reply-To: field blank. I am I missing something? Is it standard that the mail user agent (MUA) should fill it in? Roland Did you set your from in your muttrc? Like: set from=Bob Dylan [EMAIL PROTECTED] I've got this: send-hook . 'my_hdr From: Roland Cruse [EMAIL PROTECTED]' which I think does the same thing. I've typed in the Reply-to: in this email. Roland Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On Sun, Aug 17, 2003 at 07:49:03AM +, Roland Cruse wrote: On Sat, Aug 16, 2003 at 09:04:23AM -0400, Todd Slater wrote: On Sat, Aug 16, 2003 at 11:17:34AM +, Roland Cruse wrote: On Sat, Aug 16, 2003 at 01:12:09AM -0400, HaywireMac wrote: BTW, what's with yer blank reply-to, that's kinda weird... I never paid attention to it till now. I've inserted it by hand in this email. I'am using mutt and when I reply to mail it leaves it blank I also tried with evolution and it also leaves the Reply-To: field blank. I am I missing something? Is it standard that the mail user agent (MUA) should fill it in? Roland Did you set your from in your muttrc? Like: set from=Bob Dylan [EMAIL PROTECTED] I've got this: send-hook . 'my_hdr From: Roland Cruse [EMAIL PROTECTED]' which I think does the same thing. I've typed in the Reply-to: in this email. It may do the same thing, but it's not the same thing :) I think. The send-hook is for matching expressions so normally one would set a default from and then only use a send-hook if you wanted to change your from, usually depending on the sender or to address. I just use the set from and don't mess with reply to; I use send-hooks only when I'm subscribed to a list from my non-default email addy. I haven't had any problem with replies. Todd Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On 16 Aug 2003 15:23:18 - Roland Cruse [EMAIL PROTECTED] uttered: I use apache (2) for testing on my localhost. I've got a half a dozen local virtual hosts defined in /etc/httpd/conf/vhosts/Vhosts.conf. Each virtualhost is defined like so Virtualhost mytestwebsite. Plus there is a corresponding host entry in the /etc/hosts file 127.0.0.1mytestwebsite for local domain name lookup. All virtual hosts are accessible this way from my local browser i.e. http://mytestwebsite/. At the top of the Vhosts.conf there is: NameVirtualHost 127.0.0.1 to tell apache which ip. Everything works. Methinks this is what I am missing, then, because I followed the suggestion to use the specific domain instead of * and no change in the results, ie. nodex.orderinchaos.org and orderinchaos.org still load the same page. Aarrrgg! Ok, without someone telling me to use Webmin (I like to see *everything* I am doing, and I want to know how to do this on a system that does not have Webmin), what does your /etc/hosts look like? For my webserver, mine is just: 127.0.0.1 node3 localhost.localdomain localhost Thanks all! Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On Sun, Aug 17, 2003 at 11:27:46AM -0400, HaywireMac wrote: Methinks this is what I am missing, then, because I followed the suggestion to use the specific domain instead of * and no change in the results, ie. nodex.orderinchaos.org and orderinchaos.org still load the same page. Aarrrgg! Ok, without someone telling me to use Webmin (I like to see *everything* I am doing, and I want to know how to do this on a system that does not have Webmin), what does your /etc/hosts look like? For my webserver, mine is just: 127.0.0.1 node3 localhost.localdomain localhost Your: 127.0.0.1 node3 localhost.localdomain localhost Might have too many parameters maybe something like below would be more accurate though I am not sure 127.0.0.1 localhost.node3 localhost 127.0.0.1 nodex.orderinchaos.org somealias 127.0.0.1 orderinchaos.orgsomealias Here's the top of my /etc/hosts file. I have no network so it's just me and localhost (127.0.0.1) from what I understand one line takes the ip address, host name and [alias] which is optional. In theory both: http://hostname/ and http://hostnamealias/ should work, though it doesn't for me always (don't know why). After the host names used for virtual hosting there are hundreds of host names corresponding to many of the advertising domains so instead of looking in the internet they look in localhost, don't find it and no add is shown in your browser. The list can be gotten from link. 127.0.0.1 localhost.localdomain localhost 127.0.0.1 fuglug fg 127.0.0.1 apache 127.0.0.1 postnukepn 127.0.0.1 rol-siters 127.0.0.1 cms 127.0.0.1 testing 127.0.0.1 td-new # etc... #*** #Before adding these #entries to your hosts file, please visit #www.smartin-designs.com/hosts_info.htm #*** 127.0.0.1 countryestatespain.com # 123Banners 127.0.0.1 123banners.com 127.0.0.1 control.123banners.com Roland ps I am still trying to figure out my empty Reply To: header Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On Sun, Aug 17, 2003 at 09:02:57AM -0400, Todd Slater wrote: On Sun, Aug 17, 2003 at 07:49:03AM +, Roland Cruse wrote: On Sat, Aug 16, 2003 at 09:04:23AM -0400, Todd Slater wrote: On Sat, Aug 16, 2003 at 11:17:34AM +, Roland Cruse wrote: On Sat, Aug 16, 2003 at 01:12:09AM -0400, HaywireMac wrote: BTW, what's with yer blank reply-to, that's kinda weird... I never paid attention to it till now. I've inserted it by hand in this email. I'am using mutt and when I reply to mail it leaves it blank I also tried with evolution and it also leaves the Reply-To: field blank. I am I missing something? Is it standard that the mail user agent (MUA) should fill it in? Roland Did you set your from in your muttrc? Like: set from=Bob Dylan [EMAIL PROTECTED] I've got this: send-hook . 'my_hdr From: Roland Cruse [EMAIL PROTECTED]' which I think does the same thing. I've typed in the Reply-to: in this email. It may do the same thing, but it's not the same thing :) I think. The send-hook is for matching expressions so normally one would set a default from and then only use a send-hook if you wanted to change your from, usually depending on the sender or to address. I just use the set from and don't mess with reply to; I use send-hooks only when I'm subscribed to a list from my non-default email addy. I haven't had any problem with replies. Thank you. I got rid of the above send-hook and used the 'set from=From: [EMAIL PROTECTED]' and solved a .muttrc configuration problem where I wanted to change the From header depending on which folder mail came from using a folder-hook. I find the F1 mutt help hard going. But...I still get blank Reply-to: headers. Is it standard for mua to fill them in? Does mutt do it on yours? My .muttrc has no reply commands so I thinking I am getting default behavior. Roland Todd Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On Sat, Aug 16, 2003 at 01:12:09AM -0400, HaywireMac wrote: On 15 Aug 2003 06:41:49 - Roland Cruse [EMAIL PROTECTED] uttered: Instead of a star in the VirtualHost * directive put each of your domain names (what ZoneEdit has pointing at you). VirtualHost www.orderinchaos.org and see if that does it. I use apache on my local host and got mixed results using the * Thanks and welcome! I'll give it a shot in the AM, we just got our power Thank you. Ed Tharp recommended the [EMAIL PROTECTED] list after I mentioned the sometimes not user friendly linux usenet groups. BTW, what's with yer blank reply-to, that's kinda weird... I never paid attention to it till now. I've inserted it by hand in this email. I'am using mutt and when I reply to mail it leaves it blank I also tried with evolution and it also leaves the Reply-To: field blank. I am I missing something? Is it standard that the mail user agent (MUA) should fill it in? Roland Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On Sat, Aug 16, 2003 at 11:17:34AM +, Roland Cruse wrote: On Sat, Aug 16, 2003 at 01:12:09AM -0400, HaywireMac wrote: BTW, what's with yer blank reply-to, that's kinda weird... I never paid attention to it till now. I've inserted it by hand in this email. I'am using mutt and when I reply to mail it leaves it blank I also tried with evolution and it also leaves the Reply-To: field blank. I am I missing something? Is it standard that the mail user agent (MUA) should fill it in? Roland Did you set your from in your muttrc? Like: set from=Bob Dylan [EMAIL PROTECTED] Todd -- Name that tune #9: I got a harmonica job, begun to play, blowin' my lungs out for a dollar a day; I blowed inside out and upside down; the man there said he loved my sound, he was ravin' about how he loved my sound; dollar a day's worth. Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On Fri, Aug 15, 2003 at 07:34:48PM -0500, Michael Viron wrote: I use apache on my local host and got mixed results using the * If you put the *.example.com entry before any of the other VirtualHost directives, when something comes in for dev.example.com, apache uses whatever the first match is. In the example above, it would correctly pull it from /home/web/test . On the other hand if *.example.com is before the entry (either first or second on the list), it would match that entry and incorrectly use the page from /home/web/www, instead of the correct /home/web/test -- essentially ignoring any further entries. Hope this gives everyone (especially those wanting to set up virtualhosts) something useful to work with, Thanks Michael. Sometimes I find apache configuration very fickle it takes a lot of trial and error:-( And I've got alot of trial to go :-) Here's one of them... Using only a * in the Virtualhost directive. I guess it's advantage would be less typing in the configuration file. i.e. Virtualhost * I use apache (2) for testing on my localhost. I've got a half a dozen local virtual hosts defined in /etc/httpd/conf/vhosts/Vhosts.conf. Each virtualhost is defined like so Virtualhost mytestwebsite. Plus there is a corresponding host entry in the /etc/hosts file 127.0.0.1 mytestwebsite for local domain name lookup. All virtual hosts are accessible this way from my local browser i.e. http://mytestwebsite/. At the top of the Vhosts.conf there is: NameVirtualHost 127.0.0.1 to tell apache which ip. Everything works. But...When I put a * inplace of mytestwebsite for all my half dozen virtual hosts things do go so well. I only get the first listed virtual host :-( Following the example in http://httpd.apache.org/docs-2.0/vhosts/name-based.html (thank you HaywireMac) for name-based virtual hosts, it should work. (I think :-)) I am thinking apache first finds my ip (localhost) then looks at the * in the Virutalhost * then looks inside to see if ServerName mytestwebsite is the same as the requested domain. If they match, then apache uses that Virtual host. I am using the same host name in the /etc/hosts file as in the VirtualHost directive i.e. ServerName mytestsite. Translation: The calling domain name (http://mytestwebsite/) is the same as the ServerName directive as in the /etc/hosts file. Here's a snip from the apache manual... snip Now when a request arrives, the server will first check if it is using an IP address that matches the NameVirtualHost. If it is, then it will look at each VirtualHost section with a matching IP address and try to find one where the ServerName or ServerAlias matches the requested hostname. If it finds one, then it uses the configuration for that server. If no matching virtual host is found, then the first listed virtual host that matches the IP address will be used. snip My virtual hosts should match and use the right configuration but all I get is the first listed virtual host. I am wondering if me doing all this as localhost would have a different effect, or I might be missing something somewhere. Thanks in advance for any light on the subject. Roland Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On 15 Aug 2003 06:41:49 - Roland Cruse [EMAIL PROTECTED] uttered: Instead of a star in the VirtualHost * directive put each of your domain names (what ZoneEdit has pointing at you). VirtualHost www.orderinchaos.org and see if that does it. I use apache on my local host and got mixed results using the * I tried that and orderinchaos.org and nodex.orderinchaos.org still load the same page and yes, Ed, I did restart httpd! ;-) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On Thu, Aug 14, 2003 at 02:38:39PM -0400, Haywiremac wrote: and I know it does have an effect, as whatever document root is specified first is served, but never the second. here is my Vhosts.conf # Named VirtualHosts NameVirtualHost * VirtualHost * ServerName www.orderinchaos.org DocumentRoot /var/www/html /VirtualHost Instead of a star in the VirtualHost * directive put each of your domain names (what ZoneEdit has pointing at you). VirtualHost www.orderinchaos.org and see if that does it. I use apache on my local host and got mixed results using the * Roland Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
At 06:41 AM 8/15/2003 -, Roland Cruse wrote: This is a multi-part message in MIME format... =_1060908933-23073-111 On Thu, Aug 14, 2003 at 02:38:39PM -0400, Haywiremac wrote: and I know it does have an effect, as whatever document root is specified first is served, but never the second. here is my Vhosts.conf # Named VirtualHosts NameVirtualHost * VirtualHost * ServerName www.orderinchaos.org DocumentRoot /var/www/html /VirtualHost Instead of a star in the VirtualHost * directive put each of your domain names (what ZoneEdit has pointing at you). VirtualHost www.orderinchaos.org and see if that does it. I use apache on my local host and got mixed results using the * Depending on how many subdomains you have for a given domain, here's a quick rundown on what you can put in place. Say you own the domain, example.com, and you have the following names: www.example.com ftp.example.com mail.example.com dev.example.com news.example.com test.example.com and you want the following: ftp.example.com to point to /home/web/ftp dev.example.com and test.example.com to /home/web/test www.example.com and all others to point to /home/web/www You can do it for each of the domain names for a total of 6 entries, or you can do something like: VirtualHost ftp.example.com Servername ftp.example.com DocumentRoot /home/web/ftp /VirtualHost VirtualHost dev.example.com test.example.com Servername dev.example.com DocumentRoot /home/web/test /VirtualHost VirtualHost *.example.com ServerName www.example.com DocumentRoot /home/web/www /VirtualHost Keep in mind that the order for the above is important (most importantly for the *.example.com entry. Here's why: If you put the *.example.com entry before any of the other VirtualHost directives, when something comes in for dev.example.com, apache uses whatever the first match is. In the example above, it would correctly pull it from /home/web/test . On the other hand if *.example.com is before the entry (either first or second on the list), it would match that entry and incorrectly use the page from /home/web/www, instead of the correct /home/web/test -- essentially ignoring any further entries. Hope this gives everyone (especially those wanting to set up virtualhosts) something useful to work with, Michael -- Michael Viron Core Systems Group Simple End User Linux Roland =_1060908933-23073-111 Content-Type: text/plain; name=message.footer Content-Disposition: inline; filename=message.footer Content-Transfer-Encoding: 8bit Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com =_1060908933-23073-111-- Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On 15 Aug 2003 07:27:17 -0400 ed tharp [EMAIL PROTECTED] uttered: remember to restart apache, too. ya, ya, you nag like my wife... ;-) Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Virtual Hosts in Apache 2.0
On 15 Aug 2003 06:41:49 - Roland Cruse [EMAIL PROTECTED] uttered: Instead of a star in the VirtualHost * directive put each of your domain names (what ZoneEdit has pointing at you). VirtualHost www.orderinchaos.org and see if that does it. I use apache on my local host and got mixed results using the * Thanks and welcome! I'll give it a shot in the AM, we just got our power back 4 hours ago, and I just finished going through 147 mails on that hell-spawned, brain-wasting, irritating, aggravating, right-wing American infested OT list! Lotsa fun! ;-) BTW, what's with yer blank reply-to, that's kinda weird... make me copy and paste will you?! 40 lashes! Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
[newbie] Virtual Hosts in Apache 2.0
Okay, I've r'd the fm, I've followed the examples, I cannot get name-based virtual hosts to work. I've got this in my httpd2.conf: Include conf/vhosts/Vhosts.conf and I know it does have an effect, as whatever document root is specified first is served, but never the second. here is my Vhosts.conf # Named VirtualHosts NameVirtualHost * VirtualHost * ServerName www.orderinchaos.org DocumentRoot /var/www/html /VirtualHost VirtualHost * ServerName www.nodex.orderinchaos.org DocumentRoot /var/www/html/oic /VirtualHost I've done this according to the docs on the Apache page, as per the example here: http://httpd.apache.org/docs-2.0/vhosts/name-based.html I have Zonedit.com pointing both orderinchaos.org and nodex.orderinchaos.org at my external IP, but like I say, only the first entry has any effect. What am I missing, besides a clue? Thanks all! -- HaywireMac The more laws and order are made prominent, the more thieves and robbers there will be. -- Lao Tsu Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com