Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I managed to have a local install of Gitorious. Now I need to finalize the apache integration using a virtual server but nothing seems to work. See for example my /etc/hosts file:           localhost        darkstar.ilri.org darkstar        git.darkstar.ilri.org

My vhosts.conf has the following entries:

# Use name-based virtual hosting.
NameVirtualHost *:80

<VirtualHost *:80>
    <Directory /srv/httpd/htdocs>

    Options Indexes FollowSymLinks ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all

    ServerName darkstar.ilri.org
    DocumentRoot /srv/httpd/htdocs
    ErrorLog /var/log/httpd/error_log
    AddHandler cgi-script .cgi


<VirtualHost *:80>
    <Directory /srv/httpd/git.darkstar.ilri.org/gitorious/public>
        Options FollowSymLinks ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from All

    AddHandler cgi-script .cgi
    DocumentRoot /srv/httpd/git.darkstar.ilri.org/gitorious/public
    ServerName git.darkstar.ilri.org

    ErrorLog /var/www/git.darkstar.ilri.org/log/error.log
    CustomLog /var/www/git.darkstar.ilri.org/log/access.log combined

    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
        ExpiresActive On
        ExpiresDefault "access plus 1 year"

    FileETag None

    RewriteEngine On

    RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
    RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    RewriteRule ^.*$ /system/maintenance.html [L]

Now, when I go with Firefox to darkstar.ilri.org it shows the default Apache screen: "It works!". but when I go to git.darkstar.ilri.org it waits for few seconds then falls to darkstar.ilri.org and the default apache page. No error is reported. If I run httpd -S I get:

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server darkstar.ilri.org (/etc/httpd/extra/httpd-vhosts.conf:21)
         port 80 namevhost darkstar.ilri.org (/etc/httpd/extra/httpd-vhosts.conf:21)
         port 80 namevhost git.darkstar.ilri.org (/etc/httpd/extra/httpd-vhosts.conf:37)
Syntax OK

The funny thing is that if I configure gotirious in a host called gitrepository, add gitrepository and go with Firefox to gitrepository.. Gitorious works... But why not with git.darkstar.ilri.org?

Many thanks in advance.

share|improve this question
Whats the distro? Worth checking your SELinux logs in situations like this if you are running it. –  SuperBOB Jun 29 '11 at 13:03
The distro is Slackware 13.37. There are not error reports in any log file. –  QLands Jun 29 '11 at 13:18
When I run the server using WEBRick all works ok. Meaning darkstar.ilri.org:3000 works just fine. –  QLands Jun 29 '11 at 13:27
* Do both of your entries in hosts resolve normally? * Try navigating to git.darkstar.ilri.org in an alternate browser * Confirm that /var/www/git.darkstar.ilri.org/log/error.log exists/is writable by the apache user but is empty –  SuperBOB Jun 29 '11 at 14:20
Do both of your entries in hosts resolve normally? I can ping both and get a response. --- I used Konkeror as a test and I get the same result. --- I moved the logs of the virtual server to the same default place of apache calling them girerror.log and gitaccess.log. I confirm that apache can write both (there are entries in gitaccess.log) but giterror.log is empty. –  QLands Jun 30 '11 at 6:38
show 1 more comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.