What are the best practice settings and tweaks when using cloudflare. I set up cloudflare and My admin page is not working correctly. It's requiring multiple log on and when I go back to the site home page it logs me out.
Cloudflare Issues
Collapse
X
-
Tags: None
-
You should exclude the AdminCP from being cached with Cloudflare's (or any CDN) services.
IN order to use Cloudflare caching on the front-end you need to set up the Proxy server information in your /core/includes/config.php.
It is this code:
Code:/* #### Reverse Proxy IP #### If your use a system where the main IP address passed to vBulletin is the address of a proxy server and the actual 'real' ip address is passed in another http header then you enter the details here */ /* Enter your known proxy servers here. You can list multiple trusted IPs separated by a comma. You can also use the * wildcard (at the end of a definition only) or use the keyword 'all' to represent any ip address.*/ //$config['Misc']['proxyiplist'] = '127.0.0.1, 192.168.*, all'; /* If the real IP is passed in a http header variable other than HTTP_X_FORWARDED_FOR, then you can set the name here; */ //$config['Misc']['proxyipheader'] = 'HTTP_X_FORWARDED_FOR';
Code:$config['Misc']['proxyiplist'] = 'all'; $config['Misc']['proxyipheader'] = 'HTTP_CF_CONNECTING_IP';
Last edited by Wayne Luke; Thu 14 Feb '19, 8:53am.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API -
You should also read these articles - https://support.cloudflare.com/hc/en...ions/200805497Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Useful links when using Cloudflare with vB. I did both on my own vB5 forum.
Cloudflare and Sucuri act as a reverse proxy for sites using their service, which means that all of the visitor IPs will show as theirs. So if you are on the Who's
https://vbmods.rocks/forum/vbulletin...Comment
-
And like what Wayne said, I bypassed caching /admincp in the Page Rules. I also bypassed /ajax requests.Comment
-
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API👍 1Comment
-
How do I bypass ajax requests? Will this solve the PM bottleneck Wayne describes?Comment
-
You would have to try it in Cloudflare. AJAX calls go to /api/. We do not provide support for Cloudflare mainly because we have no access to their tools and it is server configuration, not software.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Yes I know I have to do most of this in Cloudflare, so I am hoping Glenn will come in and suggest something as far as settings at the Cloudflare side.
But in the meantime, what are the exact suggested settings in .htaccess and /core/includes/config.php - this thread is over a year old so want to see what exactly should be done at the vbulletin side.Comment
-
There are no vBulletin settings in the .htaccess file. Technically, this isn't even a vBulletin file. That is, vBulletin never opens or reads this file via PHP. It is an Apache configuration file. We provide a basic default to help customers get up and running. Ideally, they would add this to their virtual host file for performance benefits but most don't have the capability to do that.
If you search your vBulletin 5.6.2 /core/includes/config.php file for the word cloudflare, you'll see two settings to allow for Proxy Forwarding and using the correct IP address of the end user. This will allow your IP Tracking to be more accurate. It will not affect page loads or caching services provided by Cloudflare. Proxy support is the sum total of Cloudflare support. It is only there because at one time they had a help page providing the same information. After we added it to the config.php, the help page on the Cloudflare site was removed (for whatever reason they have).Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
I did find this.
Using Cloudflare with vBulletin forums
Also I am hoping Glenn will come in to add to this thread again.
I am just not exactly clear on how to write the rules to bypass the caching of the AdminCP and the ajax etc.
I have been experimenting with the Cache settings at the cloudflare controlpanel. Not done yet. However, I also flat out Paused the cloudflare and this did not seem to make a difference one way or another. However, I am not sure how instantly this Pause takes effect. I paused it and then immediately tested PM loading speed at my vb5 forum, and did not notice any difference, so I made Cloudflare active again.Last edited by Maltair; Thu 2 Jul '20, 10:41am.Comment
-
I've tried using Cloudflare and the caching seems to work well. Unfortunately, there's one problem that I've been unable to solve. When Cloudflare is enabled, unless a user signs in with Remember Me, they are logged out after a minute or two on my site. On Glenn Vergara 's VBMods.rock site, which is using Cloudflare I believe, I cannot log in at all unless I check Remember Me. I assume that the proxy is not passing the originating IP in the Forwarded-For and/or CF-Connecting-IP headers and that's messing up the session and the Remember Me cookie compensates for that by maintaining the credentials. In fact, I don't see these headers at all using the browser development tools when Cloudflare is active. if the proxy settings are enabled in config.php, does VBulletin strip these headers out before serving the page?VB 5.7.2
PHP 7.4
MySQL 8.0.28Comment
-
OrganForum, please check my response to your topic on my site at https://vbmods.rocks/forum/members-l...ut-remember-meComment
-
I've tried using Cloudflare and the caching seems to work well. Unfortunately, there's one problem that I've been unable to solve. When Cloudflare is enabled, unless a user signs in with Remember Me, they are logged out after a minute or two on my site. On Glenn Vergara 's VBMods.rock site, which is using Cloudflare I believe, I cannot log in at all unless I check Remember Me. I assume that the proxy is not passing the originating IP in the Forwarded-For and/or CF-Connecting-IP headers and that's messing up the session and the Remember Me cookie compensates for that by maintaining the credentials. In fact, I don't see these headers at all using the browser development tools when Cloudflare is active. if the proxy settings are enabled in config.php, does VBulletin strip these headers out before serving the page?
They should look like:
Code://default configuration for Cloudflare proxy. $config['Misc']['proxyiplist'] = '103.21.*, 103.22.*, 103.31.*, 104.16.*, 108.162.*, 131.0.*, ' . '141.101.*, 162.158.*, 172.64.*, 173.245.*, 188.114.*, 190.93.*, 197.234.*, 198.41.*, ' . '2400:cb00:*, 2405:b500:*, 2606:4700:*, 2803:f800:*, 2c0f:f248:*, 2a06:98c0:*'; $config['Misc']['proxyipheader'] = 'HTTP_CF_CONNECTING_IP';
i.e.:
Code:$config['Misc']['proxyiplist'] = 'all'
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Thanks. Yep, done those things as well as fix that @glennrocksvb found and worked for him. In addition I've tried updating the IP addresses with the latest from the Cloudflare site. Still having the sign-in issue and am seeing Cloudflare IPs in the session table, Time for me to take a deep breath and systematically go through the configurations again, I guess.
-
Related Topics
Collapse
-
by Dr SweetI am building a brand new forum (5.6.3) for a group and I have deployed it into our AWS environment. Everything so far works great. Aurora DB backend, EFS for content availability, and auto-scaling group...
-
Channel: vBulletin 5 Installs & Upgrades
-
-
by twistahHi !
Recent vb4 -> vb5 upgrade.
Experiencing forced logout moments after login. Both on the user and admin side.
In the admin control panel I can log in and get the left meny...-
Channel: Support Issues & Questions
-
-
In the core/includes/config file there's an option to restrict the admincp by ip number. Exactly how will this look when using IPv6? When I attempt to put my IPV6 in the config file it blocks me from...
-
Channel: Support Issues & Questions
-
Comment