git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Having some problem with instaweb

From
GSGurjeet Singh <singh.gurjeet@gmail.com>
Date
Jun 23, 2011, 11:48 UTC
Message-ID
<BANLkTinvSt9xGNSRKLGucsRKoChMfs_b9w@mail.gmail.com>
In-Reply-To
<m3iprx554t.fsf@localhost.localdomain>
On Thu, Jun 23, 2011 at 4:23 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 22 quoted lines
> CC-ing Eric Wong, author of git-instaweb.
>
> Gurjeet Singh <singh.gurjeet@gmail.com> writes:
>
>> I am on Linux Mint 10 and I tried the following command:
>>
>> $ git instaweb -d apache2 -p 1234 --start
>> Syntax error on line 1 of /mnt/storage/gurjeet/.git/gitweb/httpd.conf:
>> Invalid command 'server.document-root', perhaps misspelled or defined
>> by a module not included in the server configuration
>> Could not execute http daemon apache2 -f.
>
> Hmmm... it looks like starts apache2, but generates config file
> (httpd.conf) for lighttpd instead.
>
> Ahh... actually you started apache2, but didn't generate configuration
> file for it, so git-instaweb re-uses previous config file... which by
> default is lighttpd:
>
>  start, --start
>      Start the httpd instance and exit. This does not generate any of the
>      configuration files for spawning a new instance.

Now that's very unintuitive.... I am the impatient kind, and didn't read the whole paragraph. I assumed --start would just start the webserver (maybe run in daemon mode).

>
> Try using
>
>  $ git instaweb -d apache2 -p 1234 -b lynx

That worked.. I do not have lynx, but it did start apache2 and I was able to browse the repo.

Show 11 quoted lines
>
> then exiting web browser.
>
>
> BTW. I think that git-instaweb should be more helpful here... will
> investigate.
>
>> /mnt/storage/gurjeet/ is my $HOME.
>
> Nb. it doesn't mater where $HOME is, but where is git repository you
> were in when calling git-instaweb.

Got it. I have some files of my home directory in a Git repository, so $HOME is where the repository is.

I have quite a few development related Git repositories under $HOME/dev/ and instaweb shows all of them on the first page (with description etc). IOW, is it supposed to recurse down all directories to look for .git/ directories?

.git dev/EDB-ADVISORS/.git dev/EDBAS/.git dev/PCS/.git dev/PEM/.git dev/PGAGENT/.git dev/POSTGRES/.git dev/SERVICESTOOLS/.git dev/SLONY/.git

Is this expected?
>
>
> BTW. in the future it would be good idea to tell what git version are
> you using.
I am at 1.7.1

Thanks for the help, and thanks to everyone around Git for a great piece of software.

-- 
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 10 in “Having some problem with instaweb”
  1. Gurjeet SinghJun 23, 2011
  2. Jakub NarebskiJun 23, 2011
  3. Gurjeet SinghJun 23, 2011
  4. Jakub NarebskiJun 23, 2011
  5. 0/4 git-instaweb: Improving handling of --start/--restartJakub Narebski, Jun 23, 2011
  6. 1/4 git-instaweb: Extract configuring web server into configure_httpdJakub Narebski, Jun 23, 2011
  7. 2/4 git-instaweb: Use $conf, not $fqgitdir/gitweb/httpd.confJakub Narebski, Jun 23, 2011
  8. 3/4 git-instaweb: Move all actions at the end of scriptJakub Narebski, Jun 23, 2011
  9. 4/4 git-instaweb: Check that correct config file exists for (re)startJakub Narebski, Jun 23, 2011
  10. Eric WongJun 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.