[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] To Jeff Lasman!



At 12:13 PM 2/2/00  Owen Lees wrote:

Jeff !  This is what I want to do!!  Theres light at the end of the tunnel...
Ok.. wheres the virtual host block thang?

I just made a change to my virtual host block for <nobaloney.net>.

On my RaQ2 it's in /etc/httpd/conf/httpd.conf, and before I changed it, it looked like this:

NameVirtualHost 209.126.157.68
<VirtualHost 209.126.157.68>
ServerName www.nobaloney.net
ServerAdmin admin
ServerAlias nobaloney.net
DocumentRoot /home/sites/site4/web
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^209.126.157.68(:80)?$
RewriteCond %{HTTP_HOST}                !^www.nobaloney.net(:80)?$
RewriteRule ^/(.*)                      http://www.nobaloney.net/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site4/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType    text/html     .shtml
ScriptAlias /_vti_bin/_vti_adm/ /home/sites/site4/web/_vti_bin/_vti_adm/
ScriptAlias /_vti_bin/_vti_adm/ /home/sites/site4/web/_vti_bin/_vti_aut/
ScriptAlias /_vti_bin/ /home/sites/site4/web/_vti_bin/
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site4/users/$1/web/$3
</VirtualHost>

See all those lines beginning with "Rewrite"...

Just comment them out:

#RewriteEngine on
#RewriteCond %{HTTP_HOST}                !^209.126.157.68(:80)?$
#RewriteCond %{HTTP_HOST}                !^www.nobaloney.net(:80)?$
#RewriteRule ^/(.*)                      http://www.nobaloney.net/$1 [L,R]
#RewriteOptions inherit

Then restart Apache.

Here's the easy way to do it from the command line:

First read the file at var/run/httpd.pid.  Just do (from root):

# cat /var/run/httpd.pid

You'll get back a number.  In my case it's 743.

Then do:

# kill -HUP <number>

(or in my case: # kill -HUP 743)

to restart the apache server.  To make sure it's running, do:

# ps aux | grep httpd

And make sure you've got a line showing a process owned by root (first column), running "/usr/sbin/httpd".

That's it.

To see it in action, go look at <www.nobaloney.net> and then at <nobaloney.net>. You'll notice that <nobaloney.net> does NOT get rewritten in your browser window to <www.nobaloney.net>.

I'll leave this in for 48 hours in case anyone wants to look at it.

Will the 'normal' virtual sites still work?

They work on my box <smile>.

Of course if you're scared to do all this, I do work for food (or at least for money to buy food).

As they say in the internet access list, sushi is everything <smile>.

Jeff

--
Jeff Lasman, nobaloney.net
<jblists@xxxxxxxxxxxxx>
<www.nobaloney.net>, <www.mailtraqna.com>, <www.email-lists.com>