Skip to content

Instantly share code, notes, and snippets.

@yaleksandr89
Created June 30, 2019 11:38
Show Gist options
  • Save yaleksandr89/eeea5ad3f22096ae452b757475abb9f4 to your computer and use it in GitHub Desktop.
Save yaleksandr89/eeea5ad3f22096ae452b757475abb9f4 to your computer and use it in GitHub Desktop.
***
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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment