LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > listener [ANY] problem

Reply
 
Thread Tools Display Modes
  #1  
Old 05-15-2013, 02:29 AM
dims dims is offline
Member
 
Join Date: Jan 2011
Posts: 12
Default listener [ANY] problem

OS: Centos 6 x86_64
Litespeed: Litespeed Web Server Enterprise v4.2.1 without apache/panels
When we configure listener to accept ipv4 and ipv6 connections in php in SERVER_ADDR ipv4 display as ::ffff:XX.XX.XX.XX some client has errors when adding ::ffff: before ipv4.
If adding 2 listener for ipv4 and ipv6 - need duplicate vhost - this is unacceptable
How we can resolve this issue? For nginx this fix easy:
Code:
set $remote_addr_new $remote_addr;
if ($remote_addr ~* ^::ffff:(.*))
{
 set $remote_addr_new $1;
}
 
fastcgi_param   REMOTE_ADDR        $remote_addr_new;
Reply With Quote
  #2  
Old 05-15-2013, 03:35 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
set up 2 listeners, one is ipv4, one is ipv6, but map to same vhost.

just tested on an production server which run lsws, it works.

please try, any issue please report back.
Reply With Quote
  #3  
Old 05-15-2013, 04:36 AM
dims dims is offline
Member
 
Join Date: Jan 2011
Posts: 12
Quote:
Originally Posted by NiteWave View Post
set up 2 listeners, one is ipv4, one is ipv6, but map to same vhost.

just tested on an production server which run lsws, it works.

please try, any issue please report back.
Yes, we think about this, but maybe have other way?
Reply With Quote
  #4  
Old 05-15-2013, 04:48 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
must configure in above way.

for this part:
Code:
set $remote_addr_new $remote_addr;
if ($remote_addr ~* ^::ffff:(.*))
{
 set $remote_addr_new $1;
}
 
fastcgi_param   REMOTE_ADDR        $remote_addr_new;
may be able to use rewriterule to archive similar purpose:

Code:
RewriteCond %{REMOTE_ADDR} ^::ffff:(.*)$
RewriteRule (.*) - [E=REMOTE_ADDR:%1]
Reply With Quote
  #5  
Old 05-15-2013, 05:30 AM
dims dims is offline
Member
 
Join Date: Jan 2011
Posts: 12
Quote:
Originally Posted by NiteWave View Post
may be able to use rewriterule to archive similar purpose:

Code:
RewriteCond %{REMOTE_ADDR} ^::ffff:(.*)$
RewriteRule (.*) - [E=REMOTE_ADDR:%1]
Can we set this globally for all domains?
Reply With Quote
  #6  
Old 05-15-2013, 05:41 AM
dims dims is offline
Member
 
Join Date: Jan 2011
Posts: 12
This work for remote_addr, but dont work for _SERVER["SERVER_ADDR"]
Reply With Quote
  #7  
Old 05-15-2013, 07:40 AM
dims dims is offline
Member
 
Join Date: Jan 2011
Posts: 12
we ready pay for patch sapi litespeed where will be fixed :ffff: in server_addr
Reply With Quote
  #8  
Old 05-15-2013, 11:10 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
REMOTE_ADDR has been converted to IPv4 format automatically without using the rewrite rule.
SERVER_ADDR was not converted to IPv4, will fix that in 4.2.3 release.
Reply With Quote
  #9  
Old 05-15-2013, 01:06 PM
dims dims is offline
Member
 
Join Date: Jan 2011
Posts: 12
Quote:
Originally Posted by mistwang View Post
REMOTE_ADDR has been converted to IPv4 format automatically without using the rewrite rule.
SERVER_ADDR was not converted to IPv4, will fix that in 4.2.3 release.
can tell a release date for 4.2.3?
Reply With Quote
  #10  
Old 05-16-2013, 06:42 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Quote:
Originally Posted by dims View Post
can tell a release date for 4.2.3?
In about a week or so.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:58 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.