❌

Reading view

PHP-FPM with multiple VirtualHost ports possible?

1) I want use ports but not working: mydomain.com:101/index.html

2) This does work: mydomain.com/php56/index.html

So dev and production environments match want to avoid that subfolder.

--------httpd.conf for #2:------------------------

<VirtualHost *:80> <Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> <Location /php82> ProxyPass "unix:/run/php/php8.2-fpm.sock|fcgi://localhost/var/www/html/php82" </Location> <Location /php56> ProxyPass "unix:/run/php/php5.6-fpm.sock|fcgi://localhost/var/www/html/php56" </Location> </VirtualHost> 

--------httpd.conf for #1:------------------------

<VirtualHost *:80> <Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> <Location /php82> ProxyPass "unix:/run/php/php8.2-fpm.sock|fcgi://localhost/var/www/html/php82" </Location> </VirtualHost> <VirtualHost *:101> <Directory /var/www/html/php56> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> ProxyPass "unix:/run/php/php5.6-fpm.sock|fcgi://localhost/var/www/html/php56" </VirtualHost> 

EDIT: Added Listen 101 and didn't fix anything. See comment with text "AH00526" for details on error from running "apachectl configtest"

submitted by /u/peter-pickle to r/PHP
[link] [comments]
  •  
❌