FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 08-29-2008, 12:55 PM
tacone
 
Default Apache config file parser

Hello, as I am developing a new parser for parsing apache
configuration files, I thought I would post here to find out if
there's any other project/user/contributor that could be interested in
it.

Currently the parser handles most common cases, but it's not in anyway
complete nor shuold be considered stable.

It's 100% Python, and handles the parsed files using an own internal
xml rappresentation (we rely on python-lxml for that).

I posted a little tutorial at
http://www.stefanoforenza.com/a-new-parser-for-rapache/ , though i am
not sure it would give a clear idea about what the api really looks
like.

It's meant to be used this way:

>>> p = Parser()
>>> p.load( 'tests/datafiles/errordocuments.conf')
>>> for v in p.virtualhost: v.errordocument.search([404]).value = '404 /error-'+v.servername.value+'.html'
>>> for v in p.virtualhost: print v.errordocument.search([404]).value
...
404 /error-example.org.html
404 /error-example.net.html

If someone is interested just let me know.

Cheers,

Stefano

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 09:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org