Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've installed virtualmin on my VPS to manage my websites. It's working perfect and as expected nearly a year now. Recently I wanted to add some features to one of my sites, and I need git integration.

I've correctly installed git & gitweb on my server, and I can create repositories and watch them under Here is the current relevant directory tree:


drwxr-sr-x user   user .
drwxr-x--- user   user ..
-rw-r--r-- user   user git-favicon.png
-rw-r--r-- user   user git-logo.png
-rwxr-xr-x user   user gitweb.cgi
-rw-r--r-- user   user gitweb.css
drwxrwx--- apache user reponame.git


drwxrwx--- apache user .
drwxr-sr-x user   user ..
drwxrwx--- apache user branches
-rwxrwx--- apache user config
-rwxrwx--- user   user description
-rwxrwx--- apache user HEAD
drwxrwx--- apache user hooks
drwxrwx--- apache user info
drwxrwx--- apache user objects
drwxrwx--- apache user refs

But I have some questions:

  1. When I'm visiting, the owner is listed as 'Apache'. why? how can I change that?

  2. Usually, to create a new git repository, I'll do something like:

    $ mkdir proj
    $ cd proj
    $ git init
    Initialized empty Git repository in /home/user/proj/.git/
    // here I'm creating the files or copy them from somewhere else
    $ git add *.php
    $ git add README
    $ git commit -m 'initial version'

But after creating the repository in virtualmin, I can find a new dir named 'reponame.git' but not the '.git' dir. When I'm trying to run any git command (e.g. git status) I'm receiving "fatal: This operation must be run in a work tree". How can I work with that repository?

  1. Currently I need to explicitly grant access for users to be able to view the repositories via gitweb. How can I make certain repositories public?
share|improve this question

closed as off-topic by HopelessN00b Jan 14 at 2:45

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 14 at 2:45

2 Answers 2

Did you install Virtualmin using the auto-install script we provide at Or did you install Virtualmin manually?

The behavior you describe means your scripts are not being executed using suexec, but rather as the Apache user. If you used the install script, suexec should be configured, by default for all script types. If you installed manually, you'll need to set that up yourself, as well as recompile Apache (or, install the apache2-suexec-custom package, and configure it for /home, if you're using Debian/Ubuntu) to set the suexec docroot to /home.

We have some documentation about manual installs on our website, but a manual install still requires pretty significant knowledge and a big time investment. We recommend using the install script on a freshly installed Grade A supported OS, as documented on our Download page.

I don't know anything about gitweb, so I'll leave those questions unanswered.

share|improve this answer

Regarding the ownership issue: On some setups, the PHP configuration installed by a package manager (e.g. apt) overrides Virtualmin's fcgid config. The solution in this case is to edit /etc/apache2/mods-available/php5.conf, comment out the line SetHandler application/x-httpd-php, and then run apache2ctl graceful.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.