From mboxrd@z Thu Jan 1 00:00:00 1970 From: jamie.couture at gmail.com (Jamie Couture) Date: Thu, 4 Aug 2011 11:54:20 -0400 Subject: Installing using Apache rewrites In-Reply-To: <20110804151418.GA28814@singpolyma.net> References: <20110804151418.GA28814@singpolyma.net> Message-ID: I don't bother with rewrite rules for cgit anymore. My vhost looks something like this: cgit.conf ----------- ServerName example.com Alias /cgit-data /var/www/cgit ScriptAlias / /var/www/cgi-bin/cgit/ /etc/cgitrc ------------- ... css=/cgit-data/cgit.css logo=/cgit-data.cgit.png virtual-root=/ ... It will inherit the parent DocumentRoot and Directory settings. If you want, you can specify them for your own sanity: DocumentRoot /var/www/cgit Options None AllowOverride None Order allow,deny Allow from all I don't think there's much apache config help here, but I thought I'd offer my insight; at the very least, what I have done. If you want to go crazy, you can even set Expires headers for your images / css in your config as well, but you can find examples of how to do that in apache's documentation. On Thu, Aug 4, 2011 at 11:14 AM, Stephen Paul Weber < singpolyma at singpolyma.net> wrote: > I'm trying to set cgit up on a Debian system using Apache2 with rewrites. > I have this: > > RewriteEngine on > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_FILENAME} !-d > RewriteRule ^(?!\/*cgi-bin)\/*(.*) /cgi-bin/cgit.cgi/$1 [PT,L] > > ScriptAlias /cgi-bin/ /usr/local/lib/cgi-bin/cgit/ > > AllowOverride None > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > > > It's working except for: > 1) The main page does not work. No matter what rewrites I add I can't seem > to make the main page come up > 2) The static CSS/image resources are not being loaded, but I think I just > need another Alias for them probably > 3) Links in the app still link to /cgi-bin/cgit.cgi/, which is ugly > > Any thoughts on how to fix these things? > > -- > Stephen Paul Weber, @singpolyma > See for how I prefer to be contacted > edition right joseph > > ______________________________**_________________ > cgit mailing list > cgit at hjemli.net > http://hjemli.net/mailman/**listinfo/cgit >