[us...@httpd] Strange redirect issue

2009-10-29 Thread phiroc
Hi,

the network administrator at my company has created a domain name, called 
intranetalias.company.com,
which is an alias of a domain name, which I will call intranet.company.com in 
this thread.

When I curl -IL (display header and follow redirect) 
intranetalias.company.com/w, 
the following lines are displayed:

bash-3.2$ curl -IL intranetalias.company.com/w
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
Location: http://intranet.company.com/w/
...

HTTP/1.1 302 Found
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
X-Powered-By: PHP/5.3.0
Location: http://intranet.company.com/w/install.php
Cache-Control: no-cache
...


Apache redirects curl to intranet.company.com.


I have created a similar environment on a test server. However, Apache seems to 
behave differently: 

bash-3.2$ curl -IL test.company.com/drupal6
[ test.company.com is an alias of mydevelopmentsite.company.com ]
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:41:30 GMT
Server: Apache/2.2.8
Location: http://test.company.com/drupal6/
...

HTTP/1.1 200 OK
Date: Thu, 29 Oct 2009 08:52:45 GMT
Server: Apache/2.2.8 (Unix) ...
X-Powered-By: PHP/5.2
Set-Cookie: 
SESS7c5f225c10fa9a20232394a61e7275f2=5c578a0b9e7274a72de76264189a605c;
 expires=Sat, 21-Nov-2009 12:26:05 GMT; path=/; domain=.test.company.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Thu, 29 Oct 2009 08:52:45 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8


In this case, Apache redirects curl to the alias domain name, test.company.com
instead of the real domain name (mydevelopmentsite.company.com).

Why are the two Apaches behaving differently?

Please note that there aren't any redirect or URL rewriting directives in the 
Apache's 
respective configuration files which could cause that behavior.

Any help with this issue would be much appreciated.


p

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



Re: [us...@httpd] Strange redirect issue [solved]

2009-10-29 Thread phiroc
The issue was due to a commented-out directive in the w directory's .htaccess 
file:


  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  RewriteBase /w


Uncommenting the RewriteBase directive above solved the problem

p


- Mail Original -
De: phi...@free.fr
À: users@httpd.apache.org
Envoyé: Jeudi 29 Octobre 2009 10:22:38 GMT +01:00 Amsterdam / Berlin / Berne / 
Rome / Stockholm / Vienne
Objet: [us...@httpd] Strange redirect issue

Hi,

the network administrator at my company has created a domain name, called 
intranetalias.company.com,
which is an alias of a domain name, which I will call intranet.company.com in 
this thread.

When I curl -IL (display header and follow redirect) 
intranetalias.company.com/w, 
the following lines are displayed:

bash-3.2$ curl -IL intranetalias.company.com/w
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
Location: http://intranet.company.com/w/
...

HTTP/1.1 302 Found
Date: Thu, 29 Oct 2009 08:39:00 GMT
Server: Apache/2.063 (Unix)
X-Powered-By: PHP/5.3.0
Location: http://intranet.company.com/w/install.php
Cache-Control: no-cache
...


Apache redirects curl to intranet.company.com.


I have created a similar environment on a test server. However, Apache seems to 
behave differently: 

bash-3.2$ curl -IL test.company.com/drupal6
[ test.company.com is an alias of mydevelopmentsite.company.com ]
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Oct 2009 08:41:30 GMT
Server: Apache/2.2.8
Location: http://test.company.com/drupal6/
...

HTTP/1.1 200 OK
Date: Thu, 29 Oct 2009 08:52:45 GMT
Server: Apache/2.2.8 (Unix) ...
X-Powered-By: PHP/5.2
Set-Cookie: 
SESS7c5f225c10fa9a20232394a61e7275f2=5c578a0b9e7274a72de76264189a605c;
 expires=Sat, 21-Nov-2009 12:26:05 GMT; path=/; domain=.test.company.com
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Thu, 29 Oct 2009 08:52:45 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=utf-8


In this case, Apache redirects curl to the alias domain name, test.company.com
instead of the real domain name (mydevelopmentsite.company.com).

Why are the two Apaches behaving differently?

Please note that there aren't any redirect or URL rewriting directives in the 
Apache's 
respective configuration files which could cause that behavior.

Any help with this issue would be much appreciated.


p

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


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



[us...@httpd] mod_authnz_ldap AuthLDAPURL problem

2010-03-18 Thread phiroc
Hi,

when I use the following AuthLDAPURL

"ldap://adserver/ou=city1,dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))"
 NONE 

I can authenticate any user in "ou" city1.

If I replace the AuthLDPAURL by

"ldap://adserver/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))"
 NONE 

I get an Apache 2.2 internal error and in the error log the following message:

[debug] mod_authnz_ldap.c(379): [client ] [8655] auth_ldap authenticate: 
using URL 
ldap://adserver/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))
[info] [client ] [8655] auth_ldap authenticate: user myusername 
authentication failed; URI /test/ [ldap_search_ext_s() for user 
failed][Operations error]

When I do ldapsearch ... -b 'dc=abc,dc=com' 
'(&(objectClass=user)(!(objectClass=computer))(samaccountname=myusername)', the 
Active Directory server returns data, which seems to imply that there's 
something wrong with the mod_authnz_ldap module, or with the way I set it up or 
use it.

Has anyone encountered this problem before?

Is there a solution?

Many thanks.

Best regards,

p




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



Re: [us...@httpd] mod_authnz_ldap AuthLDAPURL problem

2010-03-19 Thread phiroc
Hi,

when I run ldapsearch -x -W -D 'aduser' -H 'ldap://adserver:389' -b 
'dc=iht,dc=com' 
'(&(objectclass=user)(!(objectclass=computer))(samaccountname=myname))' 
samaccountname

tethereal displays the following:

LDAP MsgId=2 Search Request, Base DN=dc=abc,dc=com
LDAP MsgId=2 Search Entry, 1 result
LDAP MsgId=3 Unbind Request

When I use mod_authnz_ldap with the following line in my Apache httpd.conf file:

AuthLDAPURL 
"ldap://adserver:389/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))"
 NONE

tethereal displays the following:

LDAP MsgId=2 Search Request, Base DN=dc=abc,dc=com
LDAP MsgId=2 Search Entry, 1 result
DNS Standard query  ForestDnsZones.ABC.com
DNS Standard query response
DNS Standard query  ForestDnsZones.ABC.com.abc.com
DNS Standard query response, No such name

In the first case, AD finds a user whose sAMAccountName is "myname", whereas, 
in the second case, AD seems to get lost in the Root DSE (which contains the 
ForestDnsZones.ABC.com branch).

Has anyone run into this problem before?

p






- Mail Original -
De: "Eric Covener" 
À: users@httpd.apache.org
Envoyé: Jeudi 18 Mars 2010 18:34:18 GMT +01:00 Amsterdam / Berlin / Berne / 
Rome / Stockholm / Vienne
Objet: Re: [us...@httpd] mod_authnz_ldap AuthLDAPURL problem

On Thu, Mar 18, 2010 at 1:25 PM,   wrote:
> Hi,
>
> when I use the following AuthLDAPURL
>
> "ldap://adserver/ou=city1,dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))"
>  NONE
>
> I can authenticate any user in "ou" city1.
>
> If I replace the AuthLDPAURL by
>
> "ldap://adserver/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))"
>  NONE
>
> I get an Apache 2.2 internal error and in the error log the following message:
>
> [debug] mod_authnz_ldap.c(379): [client ] [8655] auth_ldap authenticate: 
> using URL 
> ldap://adserver/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))
> [info] [client ] [8655] auth_ldap authenticate: user myusername 
> authentication failed; URI /test/ [ldap_search_ext_s() for user 
> failed][Operations error]
>
> When I do ldapsearch ... -b 'dc=abc,dc=com' 
> '(&(objectClass=user)(!(objectClass=computer))(samaccountname=myusername)', 
> the Active Directory server returns data, which seems to imply that there's 
> something wrong with the mod_authnz_ldap module, or with the way I set it up 
> or use it.

Can you look at the differences on the wire via e.g. wireshark?  This
should make the difference in the search pretty easy to spot.



-- 
Eric Covener
cove...@gmail.com

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


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



[users@httpd] Preventing address substitution

2013-03-04 Thread phiroc
Hello,

I have two servers, a development server call serverd.mycompany.com and a 
production server called serverp.mycompany.com. In the company's DNS, the 
Network Administrator has created an alias called intranet.mycompany.com, which 
currently resolves to serverd.mycompany.com.

When I point my browser to http://intranet.mycompany.com, the Apache server on 
serverd displays the index page, and does not change the address in the 
server's address field from http://intranet.mycompany.com to 
http://serverd.mycompany.com. On the other hand, if I point my browser to 
intranet.mycompany.com/wp, wp being a sub-directory containing Wordpress, the 
address in my browser gets replaced by serverd.mycompany.com/wp.

I can't figure out which program is responsible for the address substitution: 
Apache or Wordpress?

If it is Apache, how can I prevent it from making the substitution?

I have tried setting the ServerName variable in httpd.conf to 
intranet.mycompany.com, but to no avail.

Many thanks.

Philippe

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org