Jump to content

Search the Community

Showing results for tags 'apache2'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community
    • Rules
    • Announcements
    • Request Section
  • Webmaster Tools
    • Scripts
    • Templates
    • Programs
    • Shopify
    • Design
  • DarkNet (TOR ONION)
    • DarkNet Resources
    • DarkNet Services
  • App
    • Android
    • IOS
    • Flutter
    • Unity
    • Windows
  • Webmaster Marketplace
    • Marketplace (Buy, Sell and Trade)
    • Traffic Market (Buy, Sell and Trade)
    • Services
    • Domains
  • IPS
    • Applications And Plugins
    • Styles
  • XenForo 2.x
    • Releases
    • Add-ons
    • Styles
  • Vbulletin 5.x
    • Releases
  • Opencart
    • Templates
    • Modules
  • E-Books, Journals
    • E-Books RU
    • E-Books EN
    • Journals [EN]
  • Crypto World
    • Crypto Crurrencies
  • System Administration
    • Windows
    • Unix
    • MacOS
    • Databases
    • Other OS
    • IT Courses
  • LineAge II Shillien.fun
    • Announcements
    • Clans
    • Talk
    • Market
    • Guide
  • SMM, SEO, Target, Direct
    • SMM, SEO, Target, Direct

Blogs

  • Fox blog
  • Fox blog
  • Чтиво

Categories

  • Files
  • WebMaster Tools
    • Scripts
    • Design
  • Template
  • Programs
    • MacOS
  • Wordpress
    • Themes
    • Plugins
  • Invision Community Suite
    • Applications and Plugins
    • Templates
  • E-Books
    • E-Books RU
    • Journals [EN]
    • Books EN
  • XenForo
    • XenForo Releases
    • XenForo Add-ons
    • XenForo Styles
  • App
    • Android
  • IT Courses

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 1 result

  1. Many people use Apache2 as a web server. However, few people think about optimizing its performance, which directly affects the speed of loading site pages, the speed of processing scripts (in particular, PHP), as well as the growth of the load on the CPU and the increase in the amount of RAM used. Thus, the following manual should help beginners (and not only) users. All examples below were used on Raspberry PI 3, Debian 9, Apache 2.4.38, PHP 7.3. So, let's get started. 1. Disabling unused modules The first method is to simply disable modules that you do not use: You can view the list of currently used modules using the command: apache2ctl -M To disable the module, use the command: a2dismod *module name* Accordingly, to enable the module, use the command: a2enmod *module name* Please note that when using a2dismod, the module name must be written without the word module itself. For example, if you see proxy_module in the output of the apache2ctl -M command, then to disable it, you need to use the command — a2dismod proxy The modules that load the system the most (from personal experience) are: PHP, Ruby, Perl and other modules for various scripting languages SSL Rewrite CGI So in cases where you do not need these modules, I recommend disabling these modules. Also, after disabling any module, I recommend using the command - apache2ctl configtest, which will check the configuration of the sites used and if any of the disabled modules were necessary for them, it will return an error. 2. Changing MPM (Multi-Processing Module) and using php-fpm By default, after installation, apache2 uses MPM Prefork (1 thread per 1 connection), which significantly reduces performance, but at the same time improves stability and security. But to optimize performance, I recommend using MPM Worker, which allows you to use several threads at once per connection. To enable it, use the following commands: a2dismod mpm_prefork //Disable prefork a2dismod php7.3 //Disable the php module that depends on prefork a2enmod mpm_worker //Enable worker However, when using Worker, you may encounter a problem, because the php7.3 module depends on the Prefork module. To solve this problem, install the php7.3-fpm module, which will be used to process php scripts: apt-get update && apt-get install php7.3-fpm //Install systemctl enable php7.3-fpm && systemctl start php7.3-fpm //Add to startup and run a2enmod php7.3-fpm && a2enconf php7.3-fpm.conf //Enable the module and config for it It is worth noting that using php-fpm will also reduce the amount of RAM used by the apache2 process and speed up the processing of php scripts a little. 3. Conclusion Thus, with such simple actions we were able to optimize performance and reduce the load on the machine (RPI3 in this case). Of course, there are hundreds of other optimization options, such as enabling compression (which is really useful, but most of them are already enabled by default), changing MPM parameters (configuration files), disabling HostnameLookups, etc., but in this article I tried to reflect exactly those points that helped me the most, and I hope that they will help others.
×
×
  • Create New...
Visa  MasterCard  Maestro  American Express  Stripe  PayPal  NOWPayments FREEKASSA СБП  МИР