diff --git a/wcs.cfg-sample b/wcs.cfg-sample
new file mode 100644
index 0000000..a90f401
--- /dev/null
+++ b/wcs.cfg-sample
@@ -0,0 +1,7 @@
+[main]
+app_dir = /var/lib/wcs
+data_dir = /usr/share/wcs
+auto_create_vhosts = true
+use_long_traces = true
+#error_log = /var/log/wcs/error.log
+#redirect_on_unknown_vhost = http://www.mysite.com
diff --git a/wcs/ctl/apply_timeouts.py b/wcs/ctl/apply_timeouts.py
index 6f96a80..fd3ae10 100644
--- a/wcs/ctl/apply_timeouts.py
+++ b/wcs/ctl/apply_timeouts.py
@@ -21,8 +21,8 @@ from qommon.ctl import Command, make_option
 class CmdApplyTimeouts(Command):
     name = 'apply_timeouts'
 
-    def __init__(self):
-        Command.__init__(self, [
+    def __init__(self, main_options):
+        Command.__init__(self, main_options, [
                 make_option('--extra', metavar='DIR', action='append',
                             dest='extra', default=[]),
                 make_option('--app-dir', metavar='DIR', action='store',
@@ -37,10 +37,7 @@ class CmdApplyTimeouts(Command):
         import wcs.workflows as workflows
         import publisher
 
-        if options.app_dir:
-            publisher.WcsPublisher.APP_DIR = options.app_dir
-        if options.data_dir:
-            publisher.WcsPublisher.DATA_DIR = options.data_dir
+        self.configure_publisher(publisher.WcsPublisher, options)
         if options.silent:
             sys.stdout = file('/dev/null', 'w')
             sys.stderr = file('/dev/null', 'w')
diff --git a/wcs/ctl/clean_sessions.py b/wcs/ctl/clean_sessions.py
index 43d2ade..383e8ad 100644
--- a/wcs/ctl/clean_sessions.py
+++ b/wcs/ctl/clean_sessions.py
@@ -43,6 +43,7 @@ class CmdCleanSessions(Command):
     def execute(self, options, args):
         import publisher
 
+        self.configure_publisher(publisher.WcsPublisher, options)
         pub = publisher.WcsPublisher.create_publisher()
 
         app_dir = pub.app_dir
diff --git a/wcs/ctl/export_settings.py b/wcs/ctl/export_settings.py
index b758a1a..45c0b63 100644
--- a/wcs/ctl/export_settings.py
+++ b/wcs/ctl/export_settings.py
@@ -24,15 +24,23 @@ from qommon.ctl import Command, make_option
 class CmdExportSettings(Command):
     name = 'export_settings'
 
-    def __init__(self):
-        Command.__init__(self, [
-                make_option('--vhost', metavar='VHOST', action='store',
-                            dest='vhost'),
+    def __init__(self, main_options):
+        Command.__init__(self, main_options,
+                [
+                    make_option('--extra', metavar='DIR', action='append',
+                        dest='extra', default=[]),
+                    make_option('--app-dir', metavar='DIR', action='store',
+                        dest='app_dir', default=None),
+                    make_option('--data-dir', metavar='DIR', action='store',
+                        dest='data_dir', default=None),
+                    make_option('--vhost', metavar='VHOST', action='store',
+                        dest='vhost'),
                 ])
 
     def execute(self, options, args):
         import publisher
         stdout = sys.stdout
+        self.configure_publisher(publisher.WcsPublisher, options)
         pub = publisher.WcsPublisher.create_publisher()
         pub.app_dir = os.path.join(pub.app_dir, options.vhost)
         pub.reload_cfg()
diff --git a/wcs/ctl/process_bounce.py b/wcs/ctl/process_bounce.py
index 5fa8388..97fde6d 100644
--- a/wcs/ctl/process_bounce.py
+++ b/wcs/ctl/process_bounce.py
@@ -59,6 +59,7 @@ class CmdProcessBounce(Command):
             except (IndexError, KeyError):
                 return
 
+            self.configure_publisher(publisher.WcsPublisher, options)
             pub = publisher.WcsPublisher.create_publisher()
             pub.app_dir = os.path.join(pub.app_dir, server_part)
 
diff --git a/wcs/ctl/rebuild_indexes.py b/wcs/ctl/rebuild_indexes.py
index 7bc3b4d..8955249 100644
--- a/wcs/ctl/rebuild_indexes.py
+++ b/wcs/ctl/rebuild_indexes.py
@@ -36,22 +36,24 @@ def rebuild_vhost_indexes(destroy=False):
 class CmdRebuildIndexes(Command):
     name = 'rebuild_indexes'
 
-    def __init__(self):
-        Command.__init__(self, [
+    def __init__(self, main_options):
+        Command.__init__(self, main_options, [
                 make_option('--all', action='store_true',
-                            dest='all', default=False),
+                    dest='all', default=False),
                 make_option('--destroy', action='store_true',
-                            dest='destroy', default=False),
+                    dest='destroy', default=False),
                 make_option('--extra', metavar='DIR', action='append',
-                            dest='extra', default=[]),
+                    dest='extra', default=[]),
+                make_option('--app-dir', metavar='DIR', action='store',
+                    dest='app_dir', default=None),
+                make_option('--data-dir', metavar='DIR', action='store',
+                    dest='data_dir', default=None),
                 ])
 
     def execute(self, options, args):
         import publisher
 
-        for directory in options.extra:
-            publisher.WcsPublisher.register_extra_dir(directory)
-
+        self.configure_publisher(publisher.WcsPublisher, options)
         pub = publisher.WcsPublisher.create_publisher()
 
         app_dir = pub.app_dir
diff --git a/wcs/ctl/start.py b/wcs/ctl/start.py
index 7348040..236968e 100644
--- a/wcs/ctl/start.py
+++ b/wcs/ctl/start.py
@@ -26,8 +26,8 @@ from qommon.ctl import Command, make_option
 class CmdStart(Command):
     name = 'start'
 
-    def __init__(self):
-        Command.__init__(self, [
+    def __init__(self, main_options):
+        Command.__init__(self, main_options, [
                 make_option('--port', metavar='PORT', action='store',
                             dest='port', default=3001),
                 make_option('--extra', metavar='DIR', action='append',
@@ -44,7 +44,7 @@ class CmdStart(Command):
                 make_option('--http', action='store_true',
                             dest='http', default=False),
                 make_option('--silent', action='store_true',
-                            dest='silent', default=False),
+                           dest='silent', default=False),
                 ])
 
     def execute(self, options, args):
@@ -54,16 +54,11 @@ class CmdStart(Command):
         run_kwargs['port'] = int(options.port)
         run_kwargs['spawn_cron'] = True
         run_function = qommon.scgi_server.run
-        for directory in options.extra:
-            publisher.WcsPublisher.register_extra_dir(directory)
+        self.configure_publisher(publisher.WcsPublisher, options)
         if options.handler_connection_limit:
             run_kwargs['handler_connection_limit'] = int(options.handler_connection_limit)
         if options.script_name:
             run_kwargs['script_name'] = options.script_name
-        if options.app_dir:
-            publisher.WcsPublisher.APP_DIR = options.app_dir
-        if options.data_dir:
-            publisher.WcsPublisher.DATA_DIR = options.data_dir
         if options.http:
             run_function = qommon.scgi_server.http_run
         if options.silent:
diff --git a/wcs/qommon/cron.py b/wcs/qommon/cron.py
index de2200f..7b20cf3 100644
--- a/wcs/qommon/cron.py
+++ b/wcs/qommon/cron.py
@@ -80,7 +80,6 @@ def spawn_cron(create_publisher):
     global cron_pid
     cron_pid = os.fork()
     if cron_pid == 0:
-        print >>sys.stderr, 'Cron process launched'
         pub = create_publisher()
         # set process name, this only works on Linux, 15 == PR_SET_NAME
         if dl:
diff --git a/wcs/qommon/ctl.py b/wcs/qommon/ctl.py
index f21aff3..04427d4 100644
--- a/wcs/qommon/ctl.py
+++ b/wcs/qommon/ctl.py
@@ -16,6 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301  USA
 
+import ConfigParser
 import optparse
 from optparse import make_option
 import sys
@@ -34,13 +35,53 @@ class Command:
     name = None
     usage_args = '[ options ... ]'
 
-    def __init__(self, options=[]):
-        self.options = options
+    def __init__(self, main_options, options=None):
+        if options:
+            self.options = options
+        else:
+            self.options = [
+                    make_option('--extra', metavar='DIR', action='append',
+                        dest='extra', default=[]),
+                    make_option('--app-dir', metavar='DIR', action='store',
+                        dest='app_dir', default=None),
+                    make_option('--data-dir', metavar='DIR', action='store',
+                        dest='data_dir', default=None),
+                    ]
+        self.config = ConfigParser.ConfigParser()
+        if main_options.configfile:
+            try:
+                self.config.read(main_options.configfile)
+            except ConfigParser.ParsingError, e:
+                print >> sys.stderr, 'Invalid configuration file %s' % main_options.configfile
+                print >> sys.stderr, e
+                print >> sys.stderr, 'Using default options'
+        if not self.config.has_section('main'):
+            self.config.add_section('main')
 
     def run(self, args):
         options, args = self.parse_args(args)
         return self.execute(options, args)
 
+    def configure_publisher(self, publisher_cls, options):
+        for directory in options.extra:
+            publisher_cls.register_extra_dir(directory)
+        if options.app_dir:
+            publisher_cls.APP_DIR = options.app_dir
+        elif self.config.has_option("main", "app_dir"):
+            publisher_cls.APP_DIR = self.config.get("main", "app_dir")
+        if options.data_dir:
+            publisher_cls.DATA_DIR = options.data_dir
+        elif self.config.has_option("main", "data_dir"):
+            publisher_cls.DATA_DIR = self.config.get("main", "data_dir")
+        if self.config.has_option("main", "error_log"):
+            publisher_cls.ERROR_LOG = self.config.get("main", "error_log")
+        if self.config.has_option("main", "use_long_traces"):
+            publisher_cls.auto_create_appdir = self.config.getboolean("main", "use_long_traces")
+        if self.config.has_option("main", "auto_create_vhosts"):
+            publisher_cls.auto_create_appdir = self.config.getboolean("main", "auto_create_vhosts")
+        if self.config.has_option("main", "redirect_on_unknown_vhost"):
+            publisher_cls.missing_appdir_redirect = self.config.get("main", "redirect_on_unknown_vhost")
+
     def parse_args(self, args):
         self.parser = optparse.OptionParser(
             usage='%%prog %s %s' % (self.name, _(self.usage_args)),
@@ -111,6 +152,6 @@ class Ctl:
                 except ImportError:
                     pass
         command_class = qommon._commands[command]
-        cmd = command_class()
+        cmd = command_class(options)
         return cmd.run(args)
 
