* Installing using Apache rewrites
@ 2011-08-04 15:14 singpolyma
2011-08-04 15:54 ` jamie.couture
0 siblings, 1 reply; 2+ messages in thread
From: singpolyma @ 2011-08-04 15:14 UTC (permalink / raw)
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/
<Directory "/usr/local/lib/cgi-bin/cgit/">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
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 <http://singpolyma.net> for how I prefer to be contacted
edition right joseph
^ permalink raw reply [flat|nested] 2+ messages in thread
* Installing using Apache rewrites
2011-08-04 15:14 Installing using Apache rewrites singpolyma
@ 2011-08-04 15:54 ` jamie.couture
0 siblings, 0 replies; 2+ messages in thread
From: jamie.couture @ 2011-08-04 15:54 UTC (permalink / raw)
I don't bother with rewrite rules for cgit anymore. My vhost looks
something like this:
cgit.conf
-----------
<VirtualHost *:80>
ServerName example.com
Alias /cgit-data /var/www/cgit
ScriptAlias / /var/www/cgi-bin/cgit/
</VirtualHost>
/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
<Directory /var/www/cgit>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
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/
> <Directory "/usr/local/lib/cgi-bin/cgit/"**>
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> 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 <http://singpolyma.net> for how I prefer to be contacted
> edition right joseph
>
> ______________________________**_________________
> cgit mailing list
> cgit at hjemli.net
> http://hjemli.net/mailman/**listinfo/cgit<http://hjemli.net/mailman/listinfo/cgit>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-04 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-04 15:14 Installing using Apache rewrites singpolyma
2011-08-04 15:54 ` jamie.couture
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).