Created
March 11, 2014 19:07
-
-
Save rahulgautam/9492773 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {loglevel, 5}. | |
| %%% ================ | |
| %%% SERVED HOSTNAMES | |
| {hosts, ["127.0.0.1"]}. | |
| %%% =============== | |
| %%% LISTENING PORTS | |
| %% | |
| %% listen: Which ports will ejabberd listen, which service handles it | |
| %% and what options to start it with. | |
| %% | |
| {listen, | |
| [ | |
| {5222, ejabberd_c2s, [ | |
| {certfile, "/Applications/ejabberd-13.12/conf/server.pem"}, starttls, | |
| {access, c2s}, | |
| {shaper, c2s_shaper}, | |
| {max_stanza_size, 65536} | |
| ]}, | |
| {5269, ejabberd_s2s_in, [ | |
| {shaper, s2s_shaper}, | |
| {max_stanza_size, 131072} | |
| ]}, | |
| {5280, ejabberd_http, [ | |
| %%{request_handlers, [ | |
| %% {["web"], mod_http_fileserver} | |
| %%]}, | |
| captcha, | |
| http_bind, | |
| http_poll, | |
| web_admin, | |
| {request_handlers, [{["archive"],mod_archive_webview}]} | |
| ]}, | |
| {5285, ejabberd_http, [ | |
| {request_handlers, [ | |
| {["rest"], mod_rest} | |
| ]} | |
| ]} | |
| ]}. | |
| %%% ============== | |
| %%% AUTHENTICATION | |
| {auth_method, odbc}. | |
| %% | |
| %% MySQL server: | |
| %% | |
| {odbc_server, {mysql, "127.0.0.1", "ejabberd", "root", "11root"}}. | |
| %%% =============== | |
| %%% TRAFFIC SHAPERS | |
| %% | |
| %% The "normal" shaper limits traffic speed to 1.000 B/s | |
| %% | |
| {shaper, normal, {maxrate, 1000}}. | |
| %% | |
| %% The "fast" shaper limits traffic speed to 50.000 B/s | |
| %% | |
| {shaper, fast, {maxrate, 50000}}. | |
| %%% ==================== | |
| %%% ACCESS CONTROL LISTS | |
| {acl, admin, {user, "rahul", "127.0.0.1"}}. | |
| {acl, local, {user_regexp, ""}}. | |
| %%% ============ | |
| %%% ACCESS RULES | |
| %% Define the maximum number of time a single user is allowed to connect: | |
| {access, max_user_sessions, [{10, all}]}. | |
| %% This rule allows access only for local users: | |
| {access, local, [{allow, local}]}. | |
| %% Only non-blocked users can use c2s connections: | |
| {access, c2s, [{deny, blocked}, | |
| {allow, all}]}. | |
| %% For all users except admins used "normal" shaper | |
| {access, c2s_shaper, [{none, admin}, | |
| {normal, all}]}. | |
| %% For all S2S connections used "fast" shaper | |
| {access, s2s_shaper, [{fast, all}]}. | |
| %% Only admins can send announcement messages: | |
| {access, announce, [{allow, admin}]}. | |
| %% Only admins can use configuration interface: | |
| {access, configure, [{allow, admin}]}. | |
| %% Admins of this server are also admins of MUC service: | |
| {access, muc_admin, [{allow, admin}]}. | |
| %% All users are allowed to use MUC service: | |
| {access, muc, [{allow, all}]}. | |
| {access, muc_create, [{allow, local}]}. | |
| %% In-band registration | |
| {access, register, [{allow, all}]}. | |
| %% Everybody can create pubsub nodes | |
| {access, pubsub_createnode, [{allow, local}]}. | |
| %%% ================ | |
| %%% DEFAULT LANGUAGE | |
| {language, "en"}. | |
| %%% ======= | |
| %%% MODULES | |
| %% | |
| %% Modules enabled in all ejabberd virtual hosts. | |
| %% | |
| {modules, | |
| [ | |
| {mod_adhoc, []}, | |
| {mod_announce, [{access, announce}]}, % requires mod_adhoc | |
| {mod_caps, []}, | |
| {mod_configure,[]}, % requires mod_adhoc | |
| {mod_disco, []}, | |
| %%{mod_echo, [{host, "echo.adminstrators-macbook-air.local"}]}, | |
| {mod_http_bind,[]}, | |
| %%{mod_http_fileserver, [ | |
| %% {docroot, "/Applications/ejabberd-13.12/www"}, | |
| %% {accesslog, "/Applications/ejabberd-13.12/www/webaccess.log"}, | |
| %% {content_types, [{".htm", "text/html"}]}, | |
| %% {directory_indices, ["index.html", "index.htm"]} | |
| %%]}, | |
| {mod_last, [{db_type, odbc}]}, | |
| {mod_muc, [ | |
| {db_type, odbc}, | |
| %%{host, "conference.@HOST@"}, | |
| {access, muc}, | |
| {access_create, muc_create}, | |
| {access_persistent, muc_create}, | |
| {access_admin, muc_admin} | |
| ]}, | |
| %%{mod_muc_log,[]}, | |
| {mod_offline, [{db_type, odbc}]}, | |
| {mod_privacy, [{db_type, odbc}]}, | |
| {mod_private, [{db_type, odbc}]}, | |
| %%{mod_proxy65,[]}, | |
| {mod_pubsub, [ % requires mod_caps | |
| {access_createnode, pubsub_createnode}, | |
| {ignore_pep_from_offline, true}, % reduce resource comsumption, but XEP incompliant | |
| %%{ignore_pep_from_offline, false}, % XEP compliant, but increases resource comsumption | |
| {last_item_cache, false}, | |
| {plugins, ["flat", "hometree", "pep"]}, | |
| {db_type, odbc} | |
| ]}, | |
| {mod_register, [ | |
| %% | |
| %% After successful registration, the user receives | |
| %% a message with this subject and body. | |
| %% | |
| {welcome_message, {"Welcome!", | |
| "Welcome to this Jabber server."}}, | |
| %% | |
| %% When a user registers, send a notification to | |
| %% these Jabber accounts. | |
| %% | |
| %%{registration_watchers, ["admin1@example.org"]}, | |
| {access_form, register} | |
| ]}, | |
| {mod_roster, [{db_type, odbc}]}, | |
| %%{mod_service_log,[]}, | |
| {mod_shared_roster,[]}, | |
| %%{mod_stats, []}, | |
| {mod_time, []}, | |
| {mod_vcard, [{db_type, odbc}]}, | |
| {mod_version, []}, | |
| {mod_register_web, []}, | |
| {mod_rest, [ | |
| {allowed_ips, [ {127,0,0,1} ]}, | |
| {access_commands, [ {configure, [registered_users], []} ]} | |
| ] | |
| }, | |
| {mod_admin_extra, []} | |
| %{mod_archive, [{db_type, odbc}]} | |
| % {mod_archive2, [{rdbms, mysql}, | |
| % {time_accuracy, milliseconds}, | |
| % {default_auto_save, body}, | |
| % {only_in_roster, true}, | |
| % {force_utc, true}, | |
| % {enforce_default_auto_save, false}, | |
| % {default_expire, infinity}, | |
| % {enforce_min_expire, 0}, | |
| % {enforce_max_expire, infinity}, | |
| % {replication_expire, 31536000}, | |
| % {session_duration, 1800}, | |
| % {wipeout_interval, 86400}, | |
| % {prefs_cache_interval, 1800} | |
| % ]} | |
| ]}. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment