You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Pedro <pe...@layernetworks.org> on 2005/01/18 05:35:19 UTC

[users@httpd] Re: [Spam] RE: [users@httpd] Vhosts, newbie

hie

thanks for your help, it whorks perfect ;)
i have only one problem...
for example:

www.xxxx.com go to c:/www/xxxx.com (that instrution is defined in apache)

www.sdferer.net -> this site poits to my ip BUT is not defined in my apache config... this site will show the first vhost... how i can fix this??

one more time, thanks!


  ----- Original Message ----- 
  From: Thomas Campbell 
  To: users@httpd.apache.org 
  Sent: Tuesday, January 18, 2005 4:03 AM
  Subject: [Spam] RE: [users@httpd] Vhosts, newbie


  You basically need the NameVirtualHost directive where <yoursingleip> is your ip address on the box (like 192.168.0.100).  You'll also have to have hostname1.example.com and hostname2.example.com in your DNS or at the very least your hosts file.

   

  NameVirtualHost <yoursingleip>:80

   

  <VirtualHost <yoursingleip>:80>

     ServerName     hostname1.example.com

     DocumentRoot   /path/to/files/hostname1.example.com/htdocs

  </VirtualHost>

   

  <VirtualHost <yoursingleip>:80>

     ServerName     hostname2.example.com

     DocumentRoot   /path/to/files/hostname2.example.com/htdocs

  </VirtualHost>

   

  This is very simplified.  I clipped my httpd.conf file to create it.

   

  Good luck!

  Thomas

   


------------------------------------------------------------------------------

  From: Pedro [mailto:peter@layernetworks.org] 
  Sent: Monday, January 17, 2005 6:15 PM
  To: users@httpd.apache.org
  Subject: [users@httpd] Vhosts, newbie

   

  hie!

   

  i'm using apache for my first time... i have some ideas about apache but not mutch... i need put 2 web site in my "server"(www.yyyy.com, xxx.yyyy.com and www.zzzz.net xxx.zzzz.net)...

   i'm using last version on windows... i have only one ip... anyone can tell me what i need make ? i think i need vhost but i don't know how i put them...

   

  thanks for all

   



------------------------------------------------------------------------------


  No virus found in this outgoing message.
  Checked by AVG Anti-Virus.
  Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005




------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  The official User-To-User support forum of the Apache HTTP Server Project.
  See <URL:http://httpd.apache.org/userslist.html> for more info.
  To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
     "   from the digest: users-digest-unsubscribe@httpd.apache.org
  For additional commands, e-mail: users-help@httpd.apache.org

Re: [users@httpd] Htaccess code to Deny Referrers Spam?

Posted by Vik Rubenfeld <vi...@mindspring.com>.
On 1/26/05 12:11 PM, "Joshua Slive" <js...@gmail.com> wrote:

> Test it yourself by manually
> constructing a request as in
> 
> telnet yourhost 80
> GET /page.html HTTP/1.0
> Host: yourhost.example.com
> Referer: http://poker-whatever.com/
> [enter]

Great stuff. Thanks, Joshua.

-Vik



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Htaccess code to Deny Referrers Spam?

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 26 Jan 2005 11:19:04 -0800, Vik Rubenfeld <vi...@mindspring.com> wrote:
> > Did you check if it matches if you remove the dash?
> 
> The dash is there for a specific reason; it is so as to be cautious about
> which referrers are excluded. There might be some referrers with that string
> of text included in a larger string, which I would like not to exclude. Note
> that "poker-" is just one example; what I learn on this subject, I will use
> with lots of different text strings.

I understand that, but you need to narrow down where the problem is. 
I don't see myself anything wrong with your regex.

> > Have you tried it?  You'll get an answer much quicker if you test
> > stuff yourself rather than sending an email to the list.
> 
> I don't think that's quite accurate. I may have to wait many days, to get
> that specific referrer spam again.

You'll never fix the problem that way.  Test it yourself by manually
constructing a request as in

telnet yourhost 80
GET /page.html HTTP/1.0
Host: yourhost.example.com
Referer: http://poker-whatever.com/
[enter]

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Htaccess code to Deny Referrers Spam?

Posted by Vik Rubenfeld <vi...@mindspring.com>.
> Did you check if it matches if you remove the dash?

The dash is there for a specific reason; it is so as to be cautious about
which referrers are excluded. There might be some referrers with that string
of text included in a larger string, which I would like not to exclude. Note
that "poker-" is just one example; what I learn on this subject, I will use
with lots of different text strings.

>>> You've got a bunch of superfluous stuff there.  You could probably use just
>>> SetEnvIfNoCase Referer "poker-" BadReferer
>> 
>> Isn't it necessary to use some sort of wildcard match to catch characters to
>> the right and left of the string, "poker-"?
> 
> No.

Can you provide additional information? Compared to most people on this
list, I'm an Apache newbie. I have a weblog I'm seeking to maintain, and for
some reason information on doing what I'm trying to do with htaccess is not
easy to find. 

> Have you tried it?  You'll get an answer much quicker if you test
> stuff yourself rather than sending an email to the list.

I don't think that's quite accurate. I may have to wait many days, to get
that specific referrer spam again.



-Vik 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Htaccess code to Deny Referrers Spam?

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 26 Jan 2005 01:22:12 -0800, Vik Rubenfeld <vi...@mindspring.com> wrote:
> Hi Joshua,
> 
> Thanks for the feedback.
> 
> > A little more debugging on your part would be helful.
> > Have you checked to see if the problem is the dash?
> 
> Yes, I did check the dashes. It's the same dash character.

Did you check if it matches if you remove the dash?

> 
> > You've got a bunch of superfluous stuff there.  You could probably use just
> > SetEnvIfNoCase Referer "poker-" BadReferer
> 
> Isn't it necessary to use some sort of wildcard match to catch characters to
> the right and left of the string, "poker-"?

No.

Have you tried it?  You'll get an answer much quicker if you test
stuff yourself rather than sending an email to the list.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Htaccess code to Deny Referrers Spam?

Posted by Vik Rubenfeld <vi...@mindspring.com>.
Hi Joshua,

Thanks for the feedback.

> A little more debugging on your part would be helful.
> Have you checked to see if the problem is the dash?

Yes, I did check the dashes. It's the same dash character.

> You've got a bunch of superfluous stuff there.  You could probably use just
> SetEnvIfNoCase Referer "poker-" BadReferer

Isn't it necessary to use some sort of wildcard match to catch characters to
the right and left of the string, "poker-"?

If that is necessary, is the following the correct syntax?

     SetEnvIfNoCase Referer ".*(poker-).*" BadReferer


-Vik




On 1/25/05 9:46 AM, "Joshua Slive" <js...@gmail.com> wrote:

> On Mon, 24 Jan 2005 20:35:47 -0800, Vik Rubenfeld <vi...@mindspring.com> wrote:
>> I've got htaccess code to get rid of referrer spam. Here's an example:
>> 
>> SetEnvIfNoCase Referer ".*(stormfront).*" BadReferer
>> order deny,allow
>> deny from env=BadReferer
>> 
>> It works correctly in most cases. However, I have the following line:
>> 
>>     SetEnvIfNoCase Referer ".*(poker-).*" BadReferer
>> 
>> ...and I find that that line is not catching referrers such as the
>> following:
>> 
>>     free-texas-hold-em-poker-games.fidelityfunding.net
>>     online-poker-rooms.fidelityfunding.net
>>     texas-holdem-poker-game.fidelityfunding.net
>> 
>> How do I correct that line to get it to catch those referrers? Thanks in
>> advance for any info.
> 
> A little more debugging on your part would be helful.
> Have you checked to see if the problem is the dash?
> 
> You've got a bunch of superfluous stuff there.  You could probably use just
> SetEnvIfNoCase Referer "poker-" BadReferer
> 
> Joshua.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Htaccess code to Deny Referrers Spam?

Posted by Joshua Slive <js...@gmail.com>.
On Mon, 24 Jan 2005 20:35:47 -0800, Vik Rubenfeld <vi...@mindspring.com> wrote:
> I've got htaccess code to get rid of referrer spam. Here's an example:
> 
> SetEnvIfNoCase Referer ".*(stormfront).*" BadReferer
> order deny,allow
> deny from env=BadReferer
> 
> It works correctly in most cases. However, I have the following line:
> 
>     SetEnvIfNoCase Referer ".*(poker-).*" BadReferer
> 
> ...and I find that that line is not catching referrers such as the
> following:
> 
>     free-texas-hold-em-poker-games.fidelityfunding.net
>     online-poker-rooms.fidelityfunding.net
>     texas-holdem-poker-game.fidelityfunding.net
> 
> How do I correct that line to get it to catch those referrers? Thanks in
> advance for any info.

A little more debugging on your part would be helful.
Have you checked to see if the problem is the dash?

You've got a bunch of superfluous stuff there.  You could probably use just
SetEnvIfNoCase Referer "poker-" BadReferer

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Htaccess code to Deny Referrers Spam?

Posted by Vik Rubenfeld <vi...@mindspring.com>.
I've got htaccess code to get rid of referrer spam. Here's an example:

SetEnvIfNoCase Referer ".*(stormfront).*" BadReferer
order deny,allow
deny from env=BadReferer

It works correctly in most cases. However, I have the following line:

    SetEnvIfNoCase Referer ".*(poker-).*" BadReferer

...and I find that that line is not catching referrers such as the
following:

    free-texas-hold-em-poker-games.fidelityfunding.net
    online-poker-rooms.fidelityfunding.net
    texas-holdem-poker-game.fidelityfunding.net

How do I correct that line to get it to catch those referrers? Thanks in
advance for any info.


-Vik



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Wildcard Question in Getting Rid of Referrer Spam

Posted by Vik Rubenfeld <vi...@mindspring.com>.
I¹ve got htaccess code to get rid of spam referrers, following instructions
I found at <http://www.shooter.net/index.php/weblog/Item/119/>. It works
correctly in most cases. However, I have the following line included:

    SetEnvIfNoCase Referer ".*(poker-).*" BadReferer

...however, I find that that line is not catching the following referrers:

    free-texas-hold-em-poker-games.fidelityfunding.net
    online-poker-rooms.fidelityfunding.net
    texas-holdem-poker-game.fidelityfunding.net
    poker-game.fidelityfunding.net
    texas-hold-em-poker-game.fidelityfunding.net
    online-poker-game.fidelityfunding.net
    online-poker-games.fidelityfunding.net

Perhaps I¹m just not coding the wildcards in the line correctly. Should that
line work? If not, what is the correct way to change it? Thanks in advance
for any info.


-Vik



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Re: [Spam] RE: [users@httpd] Vhosts, newbie

Posted by Thomas Campbell <ap...@evasive.com>.
Define it as a virtual host or fix it so it doesn't point to your ip.  Not much else you can do that I know of.

 

Thomas

 

  _____  

From: Pedro [mailto:peter@layernetworks.org] 
Sent: Monday, January 17, 2005 8:35 PM
To: users@httpd.apache.org
Subject: [users@httpd] Re: [Spam] RE: [users@httpd] Vhosts, newbie

 

hie

thanks for your help, it whorks perfect ;)

i have only one problem...

for example:

 

www.xxxx.com go to c:/www/xxxx.com (that instrution is defined in apache)

 

www.sdferer.net -> this site poits to my ip BUT is not defined in my apache config... this site will show the first vhost... how i
can fix this??

 

one more time, thanks!

 

----- Original Message ----- 

From: Thomas Campbell <ma...@evasive.com>  

To: users@httpd.apache.org 

Sent: Tuesday, January 18, 2005 4:03 AM

Subject: [Spam] RE: [users@httpd] Vhosts, newbie

 

You basically need the NameVirtualHost directive where <yoursingleip> is your ip address on the box (like 192.168.0.100).  You'll
also have to have hostname1.example.com and hostname2.example.com in your DNS or at the very least your hosts file.

 

NameVirtualHost <yoursingleip>:80

 

<VirtualHost <yoursingleip>:80>

   ServerName     hostname1.example.com

   DocumentRoot   /path/to/files/hostname1.example.com/htdocs

</VirtualHost>

 

<VirtualHost <yoursingleip>:80>

   ServerName     hostname2.example.com

   DocumentRoot   /path/to/files/hostname2.example.com/htdocs

</VirtualHost>

 

This is very simplified.  I clipped my httpd.conf file to create it.

 

Good luck!

Thomas

 


  _____  


From: Pedro [mailto:peter@layernetworks.org] 
Sent: Monday, January 17, 2005 6:15 PM
To: users@httpd.apache.org
Subject: [users@httpd] Vhosts, newbie

 

hie!

 

i'm using apache for my first time... i have some ideas about apache but not mutch... i need put 2 web site in my
"server"(www.yyyy.com, xxx.yyyy.com and www.zzzz.net xxx.zzzz.net)...

 i'm using last version on windows... i have only one ip... anyone can tell me what i need make ? i think i need vhost but i don't
know how i put them...

 

thanks for all

 


  _____  


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005


  _____  


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org