Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: URL with port go to base url (not subdir) php-fpm |
|
| Author |
|
FriendlyFriend
Joined: 28 Oct 2026 Posts: 1 Location: US, Tampa
|
Posted: Wed 28 Oct '26 20:39 Post subject: URL with port go to base url (not subdir) php-fpm |
|
|
Problem I'm trying to resolve with httpd.conf directives is to have php-fpm go to different versions by port, not by subfolder in the URL.
Want:
localhost:96/phpinfo.php to show that using php 8.2 and have that web root url go to subdirectory setup with php-fpm that points to var/www/php81/
What I get:
Is showing php 8.4 (the default version on server)
What does work:
localhost:96/php82/phpinfo.php
What I get:
php 8.2 as desired, just with URL that isn't desired.
On Debian, firewall port 96 is opened. Default php is 8.4.
Not running for production server - development server for doing upgrades to old large php application.
I just wanted production and development to match without the subfolder in url difference to prevent mistakes when putting on production.
Debian (I have windows background) doesn't use a single httpd.conf file so code below is complete contents of that file, not changing other conf files:
| Code: | Listen 96
<VirtualHost *:96>
<Directory /var/www/html/php82>
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> |
Not sure what I'm missing. |
|
| Back to top |
|
|
|
|
|
|