vbulletin multi server setup

Since we’re running our vbulletin software for myp2p on multiple servers, an nginx frontend balances the traffic. We have a memcached cookie sync for session persistance with the following php.ini configuration lines:

1
2
3
[Session]
session.save_handler = memcache
session.save_path="tcp://<memcache host>:11211?persistent=1&amp;weight=1&amp;timeout=1&amp;retry_interval=15"

Make sure to remove the old session.save_handler/path lines.

The includes/class_core.php file needs te be edited, in order to obtain the proper remote ip address. Replace all instances of

1
$_SERVER['REMOTE_ADDR']

with

1
$_SERVER['HTTP_X_FORWARDED_FOR']

. In order to do this, your proxy must allow some kind of X_FORWARDED_FOR header rewrite thing.

If your backends are running on a different port than the frontend reverse proxy, you also need to manually adjust the

1
$_SERVER['SERVER_PORT']

value in includes/class_core.php.

Also make sure that there is one master server, and that slave servers sync files with rsync from the master. See this post.