Symfony 5.2 and Apache 2.4 Sat, Jan 2. 2021
Certainly the most convenient way to develop a Symfony 5.x app is to use the symfony server. Eventually however, you may have to deploy the application. For a while use of nginx with php-fpm was the flavor of the month, but there are now simple ways of still using php-fpm with apache and achieving comparable performance to nginx.
For example a vhost setting like this one is possible:
<VirtualHost *:80>
SetEnv ENVIRONMENT "dev"
<FilesMatch \.php$>
SetHandler proxy:fcgi://php:9000
# for Unix sockets, Apache 2.4.10 or higher
</FilesMatch>
# Proxy .php requests to port 9000 of the php-fpm container
DocumentRoot /usr/local/apache2/cms/public
ServerName cms.mydev.local
ServerAdmin admin@mydev.local
<Directory /usr/local/apache2/cms/public>
DirectoryIndex index.php index.html
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Send apache logs to stdout and stderr
CustomLog /proc/self/fd/1 common
ErrorLog /proc/self/fd/2
</VirtualHost>
For example a vhost setting like this one is possible:
<VirtualHost *:80>
SetEnv ENVIRONMENT "dev"
<FilesMatch \.php$>
SetHandler proxy:fcgi://php:9000
# for Unix sockets, Apache 2.4.10 or higher
</FilesMatch>
# Proxy .php requests to port 9000 of the php-fpm container
DocumentRoot /usr/local/apache2/cms/public
ServerName cms.mydev.local
ServerAdmin admin@mydev.local
<Directory /usr/local/apache2/cms/public>
DirectoryIndex index.php index.html
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Send apache logs to stdout and stderr
CustomLog /proc/self/fd/1 common
ErrorLog /proc/self/fd/2
</VirtualHost>
« previous page
(Page 1 of 1, totaling 1 entries)
next page »