Apache do not show README.TXT files in directory listing. How can i enable it?

In CentOS 6.0, i have apache for allowing to download drivers + one README.TXT file. But when the site is visited as http://site.mooo.com/ it shows all zip files but not the TXT file.

<VirtualHost *:80>
 ServerName site.mooo.com
 ServerAlias site.mooo.com
 DocumentRoot /var/www/html/download
 <Directory /var/www/html/download>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
 </Directory>
</VirtualHost>

Should show all, but only shows two zip file

/var/www/html/download/
driver.zip
driver.new.zip
README.TXT

SSL works with browser, wget, and curl, but fails with git

I have a website I am using to host redmine and several git repositories

This works perfectly for http, but I can't clone with https, i.e.

git clone http://mysite.com/git/test.git

works fine, but

git clone https://mysite.com/git/test.git

fails

The strange thing is that https seems to work for everything else I have tested. If I open

https://mysite.com/git/test.git

in a browser (tested in chrome and firefox), I get no errors or warnings. I can also

curl https://mysite.com/git/test.git
wget https://mysite.com/git/test.git

both of which work with no complaints or warnings.

Here is the verbose output from git:

$ GIT_CURL_VERBOSE=1 git clone https://[email protected]/test/test.git
Cloning into test...
Password:
* Couldn't find host mysite.com in the .netrc file; using defaults
* About to connect() to mysite.com port 443 (#0)
*   Trying 127.0.0.1... * Connected to mysite.com (127.0.0.1) port 443 (#0)
* found 157 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
* Closing connection #0
* Couldn't find host mysite.com in the .netrc file; using defaults
* About to connect() to mysite.com port 443 (#0)
*   Trying 127.0.0.1... * Connected to mysite.com (127.0.0.1) port 443 (#0)
* found 157 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
* Closing connection #0
error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://user\
@mysite.com/test/test.git/info/refs

fatal: HTTP request failed

Here is the verbose output from curl, with the personal info changed:

* About to connect() to mysite.com port 443 (#0)
*   Trying 127.0.0.1... connected
* Connected to mysite.com (127.0.0.1) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*        subject: C=US; <... cut my certs info ...>
*        start date: 2011-10-18 00:00:00 GMT
*        expire date: 2013-10-17 23:59:59 GMT
*        subjectAltName: mysite.com matched
*        issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO High-Assurance Secure Server CA
*        SSL certificate verify ok.
> GET / HTTP/1.1
> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
> Host: mysite.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 18 Oct 2011 21:39:54 GMT
< Server: Apache/2.2.14 (Ubuntu)
< Last-Modified: Fri, 14 Oct 2011 03:20:01 GMT
< ETag: "8209c-87-4af39bb89ccac"
< Accept-Ranges: bytes
< Content-Length: 135
< Vary: Accept-Encoding
< Content-Type: text/html
< X-Pad: avoid browser bug
<
<p>Welcome to the mysite.com<p/>
* Connection #0 to host mysite.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

The only difference I can see is that git seems to be using an explicit CAfile while curl uses the whole directory? I'm new to ssl (at least on the admin side), so I'm not sure what this means or how I could configure git to work the same way as curl.

I am using git 1.7.5.4 and apache 2.2.14 on Ubuntu 10.04. I've tried cloning from 3 different linux hosts (including another account on the server itself), and nothing works.

I've also used the openssl tool to verify my cert on the server:

$openssl verify -purpose sslserver -CAfile chain.crt signed.pem 
signed.pem: OK

This may be related to the bug https://bugs.maemo.org/show_bug.cgi?id=4953 but it seems different because I am not getting any warning or errors in any other program.

It may be worth mentioning that I am using gitolite and redmine_git_hosting using smart http to do authentication over https. I don't think any of this is at fault though, because the problem exists even if I just stick an otherwise working bare repo in /var/www and access it directly. Also, git over ssh (with and without gitolite) works.

Please let me know if you have any idea what might be wrong or if you'd like some more info. I'd really prefer to get ssl working properly, as opposed to forcing everyone to disable certificate checking in git, although that is a current workaround.

Thanks for reading this long post!

Htaccess does not redirect mobile users to domain.com/m

My page can be accessed through domain.com or www.domain.com
I am trying to have a redirect for users on mobile devices to the domain.com/m or *www.domain.com/m*

However I am having difficulties to do this correctly. I have put this in my .htaccess on index.php of domain.com

How to do this correctly?

RewriteCond %{REQUEST_URI} !^/http://www.domain.com/.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ /m/ [L,R=302]

"[notice] child pid XXXX exit signal Segmentation fault (11)" in apache error.log [closed]

I am using Apache/PHP/MySQL stack.
Using as framework CakePHP.

Every now and then I get a blank white page. I can't debug it through Cake, so I peek in the apache error.log and here's what I get:

[Wed Oct 12 15:27:23 2011] [notice] child pid 3580 exit signal Segmentation fault (11)
[Wed Oct 12 15:27:34 2011] [notice] child pid 3581 exit signal Segmentation fault (11)
[Wed Oct 12 15:30:52 2011] [notice] child pid 3549 exit signal Segmentation fault (11)
[Wed Oct 12 16:04:27 2011] [notice] child pid 3579 exit signal Segmentation fault (11)
zend_mm_heap corrupted
[Wed Oct 12 16:26:24 2011] [notice] child pid 3625 exit signal Segmentation fault (11)
[Wed Oct 12 17:57:24 2011] [notice] child pid 3577 exit signal Segmentation fault (11)
[Wed Oct 12 17:58:54 2011] [notice] child pid 3550 exit signal Segmentation fault (11)
[Wed Oct 12 17:59:52 2011] [notice] child pid 3578 exit signal Segmentation fault (11)
[Wed Oct 12 18:01:38 2011] [notice] child pid 3683 exit signal Segmentation fault (11)
[Wed Oct 12 22:20:53 2011] [notice] child pid 3778 exit signal Segmentation fault (11)
[Wed Oct 12 22:29:51 2011] [notice] child pid 3777 exit signal Segmentation fault (11)
[Wed Oct 12 22:33:42 2011] [notice] child pid 3774 exit signal Segmentation fault (11)

What is this segmentation fault, how can I fix this, I have no clue and would be greatfully greatful.

UPDATE:

PHP Version 5.3.4, OSX local development
Server version: Apache/2.2.17 (Unix)
CakePhp: 1.3.10

Rails – getting remote_user to return username from apache

I've looked around quite a bit and did find some information on the topic but couldn't get it to work. I have apache/tomcat installed on my webserver within my company. Previously on the same webserver when I was writing CGI applications I was successfully able to get the username of visitors on my site by access the environment var REMOTE_USER. Now that I'm riding on rails, the variable, request.env['REMOTE_USER'] returns nothing.

Please note that I am not running Mongrel which many of the online discussions assume. Also, i'm not looking to build an authentication system, I'm just looking to read in (using REMOTE_USER) the username of the people who access my site.

I'm aware that I would need to tweak my .htaccess (located in my public folder) file to forward this information from apache into my application. By looking at examples on the web, I did change it to..

RewriteCond %{REMOTE_USER} (.+)
RewriteRule ^.*$ - [E=RU:%1]
RequestHeader add X-Forwarded-User %{RU}e

..but this didn't help. Thanks.