Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion Debian/Ubuntu
  • Search

Cgit setup

Debian/Ubuntu related topics
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
spadino
Posts: 3
Joined: Wed Apr 08, 2020 5:20 pm

Os: Debian 8x
Web: apache + nginx
Cgit setup
  • Quote

Post by spadino » Wed Apr 08, 2020 5:28 pm

Hi guys! Recently switched to VestaCP from virtualmin; loving so far...

I need to setup a cgit server under a Vesta managed domain, git.mydonain.net, but I didn't have yet grasp how to do it.
Cgit configure itself as an Apache extension, under /etc/apache2/conf. I think that I should copy it's setup in my /home/$user/$mydomain/conf/web apache2 conf, but even if apache2 and nginx restart successfully, accessing http(s)://$mydonain/cgit give a 500 error...

Any clue?
Top

spadino
Posts: 3
Joined: Wed Apr 08, 2020 5:20 pm

Os: Debian 8x
Web: apache + nginx
Re: Cgit setup
  • Quote

Post by spadino » Thu Apr 09, 2020 2:27 am

So, managed with a new template. Here it is:

Code: Select all

<VirtualHost %ip%:%web_port%>

    ServerName %domain_idn%
    %alias_string%
    ServerAdmin %email%
    DocumentRoot %docroot%
    ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
    ScriptAlias /cgit/ "/usr/lib/cgit/cgit.cgi/"
    RedirectMatch ^/cgit$ /cgit/
    Alias /cgit-css "/usr/share/cgit/"
    <Directory "/usr/lib/cgit/">
        AllowOverride None
        Options ExecCGI FollowSymlinks
        Require all granted
    </Directory>
    Alias /vstats/ %home%/%user%/web/%domain%/stats/
    Alias /error/ %home%/%user%/web/%domain%/document_errors/
    #SuexecUserGroup %user% %group%
    CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
    CustomLog /var/log/%web_system%/domains/%domain%.log combined
    ErrorLog /var/log/%web_system%/domains/%domain%.error.log
    <Directory %docroot%>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir %docroot%:%home%/%user%/tmp
        php_admin_value upload_tmp_dir %home%/%user%/tmp
        php_admin_value session.save_path %home%/%user%/tmp
        php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%"
    </Directory>
    <Directory %home%/%user%/web/%domain%/stats>
        AllowOverride All
    </Directory>

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid %user% %group%
        RGroups www-data
    </IfModule>
    <IfModule itk.c>
        AssignUserID %user% %group%
    </IfModule>

    IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*

</VirtualHost>
This reflect the default cgit setup in Debian 9.
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: Cgit setup
  • Quote

Post by grayfolk » Thu Apr 09, 2020 8:44 am

If you use nginx no sense to use apache for cgit.
Try nginx config from here: https://gist.github.com/stran12/1394757
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Debian/Ubuntu”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password