How to Configure PHP for Nginx with PHP-FPM on Ubuntu

How to Configure PHP for Nginx with PHP-FPM on Ubuntu

Tony Teaches Tech

3 года назад

52,881 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

The Killing Joke
The Killing Joke - 31.10.2023 01:33

now i need the SSL, i dont know where to put the directives

Ответить
Acute Club
Acute Club - 05.10.2023 23:52

you really helped me with this.....thanks a lot

Ответить
VORNAME NACHNAME
VORNAME NACHNAME - 24.08.2023 15:12

You seem like a nice guy and I like your calm way of delivering. But I find it sad, that even someone like you goes the "just for demo I do all as root"-route. That is one of the root causes for a lot of IT un-professionals working as IT-professionals do a lot of insecure crap.

Ответить
Andres Garcia
Andres Garcia - 19.07.2023 06:17

Thank you so much again, great video, first i was deploying Django, now i'm on php, would you recomend deploy a server in apache2 or nginx?.

Ответить
Martial
Martial - 12.07.2023 22:58

Hey , is any way to log php errors to a local file with nginx? , I can't see any php log when an error happens

Ответить
Minhaz Mohamed
Minhaz Mohamed - 11.07.2023 23:22

For PHP 8.1 use add the following lines instead in the nginx config:

location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.1-fpm.sock; # Replace with the correct PHP version and socket path
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

Ответить
tubejim101
tubejim101 - 09.07.2023 22:44

Keep seeing: server_name _; What does that mean? Does the underscore do something? Is it here to remind you to set it?

Ответить
emre tasdemir
emre tasdemir - 28.06.2023 23:57

Thanks man, I was trying to get that working for like days

Ответить
JKey程序员朴素无华且枯燥
JKey程序员朴素无华且枯燥 - 27.03.2023 16:54

thanks got it

Ответить
আবোল তাবোল - The mix channel
আবোল তাবোল - The mix channel - 28.11.2022 05:52

thanks

Ответить
LCT
LCT - 26.09.2022 19:22

I love how every php-fpm and nginx post and video just tells u to copy paste shit without 0 explanations. Getting so fucking frustrated with this setup and the lack of knowledge.

Ответить
Ciro Peixoto
Ciro Peixoto - 12.09.2022 03:47

Thanks !!!

Ответить
Tony Kososki
Tony Kososki - 24.08.2022 23:13

Hey TTT,

would you mind to explain why you are not using "proxy pass" instead of fastcgi_pass? Is there any difference between those two?

im trying to use nginx container as a reverse proxy that sends all php request to wordpress container with php-fpm (they are in the same network)

If you may or not - thanks!
And good video!

Ответить
nei Arshes
nei Arshes - 27.06.2022 15:54

找遍了整个中文世界搞不出来,还是要看老外。一遍过。

Ответить
Bluemer
Bluemer - 21.05.2022 20:54

I can't connect to the DB through php installed with nginx on my website. Records are not displayed. I also installed php-fpm. Thankx

Ответить
Satnam Singh
Satnam Singh - 27.04.2022 14:06

Thanks for this... I learned how to change/add ports and with same ip and run different site.

Ответить
Ankit Rathore
Ankit Rathore - 27.03.2022 01:13

BC you broke my system

Ответить
KF Cheng Channel
KF Cheng Channel - 18.01.2022 21:42

This video is so helpful solving my problem. Thanks.

Ответить
Inspirer
Inspirer - 30.12.2021 15:29

Works ty ty

Ответить
Graham Rimmington
Graham Rimmington - 11.12.2021 19:05

wow got my head around loads of stuff here I've never understood.... plus you sorted my actual problem I was fighting with :-D

Ответить
Diego Slinger
Diego Slinger - 22.10.2021 06:24

This dude is good

Ответить
Pik Bo 100
Pik Bo 100 - 19.10.2021 13:55

after install nginx i have this error This site can’t be reached so i cant open my website

Ответить
Insane Pyro
Insane Pyro - 11.10.2021 13:03

thank you

Ответить
Oddity
Oddity - 07.10.2021 23:48

OMG THANK YOU SOOO MUCH THIS VIDEO HELPED MORE THAN YOU"LL EVER KNOW KEEP DOING YOUR THING

Ответить
shuham pcpl
shuham pcpl - 20.09.2021 10:42

How to run multiple project in nginx serve

Ответить
hoho Jimmy
hoho Jimmy - 31.08.2021 00:51

I don’t know which step have error when I curl IP address got my original code 😕

Ответить
Syed Sirajul Islam Anik
Syed Sirajul Islam Anik - 10.07.2021 04:17

which font do you use in your terminal?

Ответить
0
0 - 04.07.2021 10:26

i did the same as you did but the index.php is a blank page !

Ответить
Максим Рябцев
Максим Рябцев - 28.06.2021 01:43

Неплохо

Ответить
Олег Олейник
Олег Олейник - 13.06.2021 18:10

Thank you! It`s very simple for understanding and useful tutorial

Ответить
Tun Lin Aung
Tun Lin Aung - 13.06.2021 08:08

Your the best teacher for me

Ответить
Ariya Mingboupha
Ariya Mingboupha - 10.06.2021 18:45

Could you please check nginx 1.20.1 and php8.0-fpm ? i try to install it , but it des not work

Ответить
Nobody
Nobody - 07.03.2021 07:41

403 Error...

Ответить
Oswee
Oswee - 26.02.2021 14:33

Would like to see HAProxy node + TLS terminantion <-> Nginx (web server only mode) node <-> PHP-FPM node configuration. + passing headers down to the PHP-FPM. With "node" i mean separate servers and not the processes on the same server.

Ответить
Denys Barzynskyi
Denys Barzynskyi - 28.01.2021 00:16

Thanks you I’ll add this video to bookmarks. Thanks for your work. You are the best! 💪🏻💪🏻💪🏻

Ответить
Playhouse Media Group
Playhouse Media Group - 27.01.2021 15:50

Thank you, Tony, very helpful. If possible can you also o a tutorial on creating a server on GCP for hosting and managing multiple websites with maybe an FTP software or any website management software.

A video for hosting a node website on GCP Virtual Machine.

thank you.

Ответить