You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Sam Roberts <vi...@gmail.com> on 2009/01/18 20:20:18 UTC

A question about getting a module to handle a specific Location

I apologize if this is the wrong forum, I'm not too sure where to ask
(the mod_atom dev list appears dead).


---------- Forwarded message ----------
Date: Tue, Dec 16, 2008 at 9:42 PM
Subject: Can somebody give me an example configuration?
To: dev@mod-atom.kenai.com

Perhaps mod_atom shouldn't be the first time I ever try to use apache,
but I did:

------------
LogLevel debug
LoadModule atom_module libexec/apache2/mod_atom.so
AtomPub /blogs /Users/sam/Documents/Blog/Atom "Blog Name" "Author Name"
<Location /blogs>
#AtomPub /blogs /Users/sam/Documents/Blog/Atom "Blog Name" "Author Name"
# How do I map this to mod_atom? The above is illegal "AtomPub not allowed here"
</Location>
------------

mod_atom created the structure, but somehow I need to tell apache that
http://localhost/blogs should go to mod_atom instead of the
DocumentRoot.

How?

Cheers,
Sam

-- 
Ars longa, vita brevis, occasio praeceps, experimentum periculosum,
iudicium difficile.

Re: A question about getting a module to handle a specific Location

Posted by Sam Roberts <vi...@gmail.com>.
On Sun, Jan 18, 2009 at 12:23 PM, Eric Covener <co...@gmail.com> wrote:
> On Sun, Jan 18, 2009 at 2:20 PM, Sam Roberts <vi...@gmail.com> wrote:
>> Perhaps mod_atom shouldn't be the first time I ever try to use apache,
>> but I did:
> The doc implies that no Location container or other directives should
> be required, since the prefis is in the AtomPub directive.

Thanks for the suggestions.

Using AtomPub alone was my first attempt, but no luck.

This:

  LogLevel debug
  LoadModule atom_module libexec/apache2/mod_atom.so
  AtomPub /blogs /Users/sam/Documents/Blog/Atom "Blog Name" "Author Name"

Causes /Users/sam/Documents/Blog/Atom to come into existence:

  [Sun Jan 18 15:05:02 2009] [info] Publication 'Blog Name' at
'/blogs' successfully loaded!

(and I can see the  tree created as described in Tim's architecture docs)

But attempting to access http://ensemble/blogs gives 404:

  *** /var/log/apache2/access_log ***
fe80::203:93ff:fead:88c - - [18/Jan/2009:15:05:39 -0800] "GET /blogs
HTTP/1.1" 404 203

I'm running the Apache from the latest OS X. It has:

  Include /private/etc/apache2/other/*.conf

so I put my configuration in /etc/apache2/other/atom.conf. Maybe the
rest of the default config is interfering somehow?

Or maybe mod_atom just doesn't work as advertised. :-(

Cheers,
Sam

-- 
Ars longa, vita brevis, occasio praeceps, experimentum periculosum,
iudicium difficile.

Re: A question about getting a module to handle a specific Location

Posted by Eric Covener <co...@gmail.com>.
On Sun, Jan 18, 2009 at 2:20 PM, Sam Roberts <vi...@gmail.com> wrote:
> Perhaps mod_atom shouldn't be the first time I ever try to use apache,
> but I did:
>
> ------------
> LogLevel debug
> LoadModule atom_module libexec/apache2/mod_atom.so
> AtomPub /blogs /Users/sam/Documents/Blog/Atom "Blog Name" "Author Name"
> <Location /blogs>
> #AtomPub /blogs /Users/sam/Documents/Blog/Atom "Blog Name" "Author Name"
> # How do I map this to mod_atom? The above is illegal "AtomPub not allowed here"
> </Location>
> ------------
>
> mod_atom created the structure, but somehow I need to tell apache that
> http://localhost/blogs should go to mod_atom instead of the
> DocumentRoot.
>

The doc implies that no Location container or other directives should
be required, since the prefis is in the AtomPub directive.

http://www.tbray.org/ongoing/When/200x/2007/06/25/mod_atom

Configuration · There isn't much. In your Apache config file, you can
define as many "publications" as you want. Each requires one
directive, for example: ¶

AtomPub /blogs/joe /z0/pubs/blogs/jb "Joe's Blog" "J. Blow"

The first argument is a prefix; any URI beginning with it is
considered to be part of the publication. The second is the filesystem
directory where the data is rooted. The filenames are the same as the
URIs, only with the directory substituted for the prefix. The title
and author are self-explanatory. There are no defaults.

-- 
Eric Covener
covener@gmail.com