markdown 在FPM / FastCGI上切换Apache

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 在FPM / FastCGI上切换Apache相关的知识,希望对你有一定的参考价值。

***
First you need to install `php` && `apache`
***

## Конфигурация Apache

### First

```
a2enmod actions fastcgi alias proxy_fcgi
```

### Second

```
sudo gedit /etc/apache2/sites-available/000-default.conf
```

Update the configuration
```
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html

<Directory /var/www/html>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>

<FilesMatch \.php$>
# 2.4.10+ can proxy to unix socket
SetHandler "proxy:unix:/var/run/php/php__*specify the installed version php(7.1,7.2, etc)*__-fpm.sock|fcgi://localhost/"

# Else we can just use a tcp socket:
#SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```

### Restart apache

```
sudo systemctl restart apache2
```

以上是关于markdown 在FPM / FastCGI上切换Apache的主要内容,如果未能解决你的问题,请参考以下文章

FastCgi与PHP-fpm之间的关系

fastCGI与PHP-fpm

搞不清FastCgi与PHP-fpm之间是个什么样的关系

什么是FastCGI, PHP-FPM

FastCGI 进程管理器(FPM)

搞清FastCgi与PHP-fpm之间的关系