litespeedtech / ols-docker-env

OpenLiteSpeed Docker Environment
MIT License
194 stars 127 forks source link

Support many php version in onelitespeed #62

Closed lhthang1998 closed 1 year ago

lhthang1998 commented 1 year ago

Hi, I'd like to set up the app with PHP version I choose. I.e: app1 with php74 and app2 with php80 Is it possible to do configure many PHP version in ols-docker-env like that? Thanks

qtwrk commented 1 year ago

https://openlitespeed.org/kb/setup-ols-with-more-than-one-php-build/

https://openlitespeed.org/kb/setup-per-directory-file-php/

basically , you can install desired PHP version , set up external app, then in each vhost , set the script handler to designated PHP, or use rewrite rule directive

lhthang1998 commented 1 year ago

thanks just 1 more thing, after the above setup. how I could tell/configure/link the app/domain to the PHP version I want what I want here:

  1. create app/domain A with PHP 74
  2. create app/domain B with PHP 80
qtwrk commented 1 year ago

I know thing or two about OLS, but not the docker , so this is based on my experience with normal Linux

1) install php74 and php80 if needed

2) configure 2 external app , one for 74 one for 80 , either both at server level , or one per each domain

3) once ext app is created, you can set up the script handler to corresponding ext app, like domain A to php74 ext app , and domain B to php80 ext app

https://youtu.be/urnHwEQ2eAE?t=302

lhthang1998 commented 1 year ago

thank you sm

computocell commented 4 months ago

Obrigado

I know thing or two about OLS, but not the docker , so this is based on my experience with normal Linux

  1. install php74 and php80 if needed
  2. configure 2 external app , one for 74 one for 80 , either both at server level , or one per each domain
  3. once ext app is created, you can set up the script handler to corresponding ext app, like domain A to php74 ext app , and domain B to php80 ext app

https://youtu.be/urnHwEQ2eAE?t=302

Muito Obrigado.