Apache has dual personality: sends 200 to the browser and 301 to curl.

Support for webhosts that use CentOS
Post Reply
outre99
Posts: 3
Joined: 2008/07/27 14:08:22

Apache has dual personality: sends 200 to the browser and 301 to curl.

Post by outre99 » 2008/07/27 14:12:16

All,
i'm at the end of my rope here. It's been 3 days and i can't figure it out.

Here's the problem. I'm running Subversion repository and am making it available through a https virtual host. When i access the address through the browser it presents the certificate (homemade for now), requests user login, and displays the contents for the repository. Everything is fine.
But when i try to access the same repository over TortoiseSVN or test with curl i get 301 Permanently Moved response (see below for message details.)
There are no mod-rewrite rules or redirect directives in htppd.conf file or any imported .conf files. I also don't see 301 reponse in the VH log at the debug level.

So where is this 301 coming from? I need help, please.

**************************
curl command and response from my home linux box to the server:

[kiril@KDevBox ~]$ curl -k -u xxxxx:yyyyyy https://repo.beartechsolutions.com/svk_test


301 Moved Permanently

Moved Permanently
The document has moved here.

Apache/2.2.3 (CentOS) Server at repo.beartechsolutions.com Port 443

[kiril@KDevBox ~]$

*************************
last lines from the error log. everything else has to do with ssl processing. log level is set to debug. there's no mention of 301 status anywhere.

[Sun Jul 27 20:56:56 2008] [debug] ssl_engine_kernel.c(1765): OpenSSL: Read: SSL negotiation finished successfully
[Sun Jul 27 20:56:56 2008] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
[Sun Jul 27 20:56:56 2008] [info] [client 124.120.224.228] Connection closed to child 0 with standard shutdown (server repo.beartechsolutions.com:443)



**************************
The applicable extract from the httpd.conf file:

NameVirtualHost 203.151.233.136:80
NameVirtualHost 203.151.233.136:443

...


ServerName repo.beartechsolutions.com

# Turn on SSL access
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/cert.pem
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/key.pem

# Directory / is needed here to enforce SSL for the entire vhost,
# including global aliases. This prevents accidental access to
# global aliases without SSL.

Options FollowSymLinks
SSLRequireSSL On


DocumentRoot /reporoot

DAV svn
SVNParentPath /reporoot
AuthType Basic
AuthName "SVN Repos"
AuthUserFile /etc/svn-auth-file
Require valid-user
SVNPathAuthz off



SSLOptions +StdEnvVars


SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

CustomLog /reporoot/logs/svn_logfile "%t %u %{SVN-ACTION}e" env=SVN-ACTION
ErrorLog /reporoot/logs/repo_error.log
LogLevel debug

finnzi
Posts: 76
Joined: 2006/01/02 21:10:55
Location: Reykjavik, Iceland
Contact:

Apache has dual personality: sends 200 to the browser and 30

Post by finnzi » 2008/07/28 00:31:19

Hi,

If you do curl -k -u xxxxx:yyyyyy https://repo.beartechsolutions.com/svk_test/ (With the extra slash), does it work?

Bgrds,
Finnzi

outre99
Posts: 3
Joined: 2008/07/27 14:08:22

Re: Apache has dual personality: sends 200 to the browser and 301 to curl.

Post by outre99 » 2008/07/28 01:09:26

No, it doesn't. Please see curl command output in the original message. It returns 301.

Post Reply

Return to “CentOS 5 - Webhosting Support”