This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:webserver:apache [2016/09/18 22:50] tkilla created |
linux:webserver:apache [2019/06/04 12:43] (current) tkilla |
||
---|---|---|---|
Line 40: | Line 40: | ||
- | ===== PHP-FPM | + | ===== Block Bots ===== |
- | Use php-fpm for better performance and better security: run each domain | + | This line in apache2.conf // httpd.conf blocks the User-Agent EvilBotName: |
- | | + | |
- | a2enmod actions | + | |
| | ||
- | cp / | ||
- | | ||
- | mcedit / | ||
- | | ||
- | < | ||
- | AddType application/ | ||
- | Action application/ | ||
- | Alias /php5-fcgi / | ||
- | FastCgiExternalServer / | ||
- | < | ||
- | Require all granted | ||
- | </ | ||
- | </ | ||
- | |||
- | apache2ctl configtest | ||
- | / | ||
- | |||
- | check if a phpfpm " | ||
- | |||
- | now configure pools for each domain/ | ||
- | |||
- | cd / | ||
- | cp www.conf {user1.conf, | ||
- | |||
- | replace all appearances of " | ||
- | / | ||
- | |||
- | You need to edit your vhosts to use the new pool. | ||
- | Replace USERNAME by the poolname you just created and VHOSTNAME by a dfifferent name in each vhost: | ||
- | |||
- | |||
- | < | ||
- | ... | ||
- | < | ||
- | Alias /php5-fcgi / | ||
- | FastCgiExternalServer / | ||
- | </ | ||
- | ... | ||
- | |||
- | The username must be an exisiting user in the system. e.g.: | ||
- | adduser --disabled-login USERNAME | ||
- | adduser www-data USERNAME | ||
- | mkdir / | ||
- | chown -R USERNAME: | ||
- | chmod 750 / | ||
- | |||
- | |||
- | Links: | ||
- | * https:// | ||
- | * http:// | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- |