Title: Firewall Optimization at A2 Hosting
Last modified: September 24, 2020

---

# Firewall Optimization at A2 Hosting

 *  Resolved [Jim](https://wordpress.org/support/users/jwmc/)
 * (@jwmc)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-at-a2-hosting/)
 * Sorry to come back to the trough so soon – I just switched providers to A2 Hosting
   so a lot of things coming up.
 * When I went to optimize the firewall, WF suggested the setting “Litespeed/lsapi”.
   I went ahead and it quickly reported it was optimized. I wasn’t sure if that 
   meant only it was able to make the changes, or that it was really detecting that
   the changes were having the desired effect.
 * So I asked the hosting support folks, listing all the WF options. They said, 
   based on the info I provided, the appropriate setting was “Apache+mod_php”. So
   I removed “Extended Protection” and did it again with that setting. WF kept waiting
   and it never said it worked, and when I cleared the dialog it showed not optimized.
   So I reverted to Litespeed/lsapi.
 * I looked at php info on the server and found these entries:
    System: Linux Server
   API: Litespeed V7.7 (variable) $_SERVER[‘SERVER_SOFTWARE’]: Apache
 * So which should I be using, or does it require some kind of manual change like
   the ones in [https://www.wordfence.com/help/firewall/optimizing-the-firewall/](https://www.wordfence.com/help/firewall/optimizing-the-firewall/)
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffirewall-optimization-at-a2-hosting%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [WFAdam](https://wordpress.org/support/users/wfadam/)
 * (@wfadam)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-at-a2-hosting/#post-13453786)
 * Hello [@jwmc](https://wordpress.org/support/users/jwmc/) and thanks for reaching
   out to us!
 * Wordfence will treat A2 Hosting as a LiteSpeed server in order to optimize the
   firewall. If you check your `.htaccess` file, you will need this code in there.
 *     ```
       <IfModule LiteSpeed>
       php_value auto_prepend_file '/path/wordfence-waf.php'
       </IfModule>
       <IfModule lsapi_module>
       php_value auto_prepend_file '/path/wordfence-waf.php'
       </IfModule>
       ```
   
 * Make sure that you change `/path/` to the correct path to your `wordfence-waf.
   php` file. That should optimize the firewall for you, but this code might already
   be in your .htaccess file, so I would just check to make sure.
 * Let me know what you find!
 * Thanks!
 *  Thread Starter [Jim](https://wordpress.org/support/users/jwmc/)
 * (@jwmc)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-at-a2-hosting/#post-13454124)
 * Yes, that code is in .htaccess with the correct path. In addition, there is this
   after it:
 *     ```
       <Files ".user.ini">
       <IfModule mod_authz_core.c>
       	Require all denied
       </IfModule>
       <IfModule !mod_authz_core.c>
       	Order deny,allow
       	Deny from all
       </IfModule>
       </Files>
       ```
   
 * I wonder what the reference to .user.ini is about. There is such a file, with
   `
   auto_prepend_file = '/home/forestpa/public_html/wordfence-waf.php'` I’m not sure
   if that is left from my attempt at using Apache+mod_php, or it should still be
   there.
 * Thanks!
 *  Plugin Support [WFAdam](https://wordpress.org/support/users/wfadam/)
 * (@wfadam)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-at-a2-hosting/#post-13454494)
 * You can leave that there [@jwmc](https://wordpress.org/support/users/jwmc/)
 * Are you able to scan and use all the free features without any issues?
 * Let me know what you find!
 * Thanks!
 *  Thread Starter [Jim](https://wordpress.org/support/users/jwmc/)
 * (@jwmc)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-at-a2-hosting/#post-13454510)
 * Yes, everything Wordfence is working awesomely. Many thanks!
 *  Plugin Support [WFAdam](https://wordpress.org/support/users/wfadam/)
 * (@wfadam)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-at-a2-hosting/#post-13455014)
 * Glad we could resolve this together [@jwmc](https://wordpress.org/support/users/jwmc/)
 * If you have any other questions or issues, always feel free to open another topic
   here!
 * Thanks again for your support!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Firewall Optimization at A2 Hosting’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [WFAdam](https://wordpress.org/support/users/wfadam/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-at-a2-hosting/#post-13455014)
 * Status: resolved