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

  Рет қаралды 60,143

Tony Teaches Tech

Tony Teaches Tech

Күн бұрын

Пікірлер: 76
@EddieMao
@EddieMao 11 ай бұрын
Great video, Tony, thanks for sharing
@amandaudunglangthasa4089
@amandaudunglangthasa4089 3 ай бұрын
Thank you man i was trying for two day as a beginner but i was not able to great help thanks
@hisatnam
@hisatnam 2 жыл бұрын
Thanks for this... I learned how to change/add ports and with same ip and run different site.
@tubejim101
@tubejim101 Жыл бұрын
Keep seeing: server_name _; What does that mean? Does the underscore do something? Is it here to remind you to set it?
@GrahamRimmington
@GrahamRimmington 3 жыл бұрын
wow got my head around loads of stuff here I've never understood.... plus you sorted my actual problem I was fighting with :-D
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Makes me happy to hear that!
@The_Oddity
@The_Oddity 3 жыл бұрын
OMG THANK YOU SOOO MUCH THIS VIDEO HELPED MORE THAN YOU"LL EVER KNOW KEEP DOING YOUR THING
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Makes me very happy to hear that :)
@VisualBeowulf
@VisualBeowulf 6 ай бұрын
Now watch capslock tutorial.
@crossfire423
@crossfire423 6 ай бұрын
Ok thanks for vid that was easy but right now i have a problem with prestashop and import products... when im importing from csv file i have an error after 25 products was imported file have 80-100 products can you lead me to the configuration were can i fix it?
@emretasdemir8028
@emretasdemir8028 Жыл бұрын
Thanks man, I was trying to get that working for like days
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Glad I could help
@tunlinaung010
@tunlinaung010 3 жыл бұрын
Your the best teacher for me
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Happy to hear that!
@martial5483
@martial5483 Жыл бұрын
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
@BlueTeamBorja
@BlueTeamBorja 2 жыл бұрын
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
@tonykososki3016
@tonykososki3016 2 жыл бұрын
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!
@yaolegoleynik
@yaolegoleynik 3 жыл бұрын
Thank you! It`s very simple for understanding and useful tutorial
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome
@Oswee
@Oswee 3 жыл бұрын
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.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Do you have any documentation/tutorials about this set up?
@Oswee
@Oswee 3 жыл бұрын
@@TonyTeachesTech I don't think you will find any complete documentation for such setup. It's rather 3 separate docs.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@Oswee Understood
@kfchenghk
@kfchenghk 2 жыл бұрын
This video is so helpful solving my problem. Thanks.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@acuteclub7381
@acuteclub7381 Жыл бұрын
you really helped me with this.....thanks a lot
@sirajul-anik
@sirajul-anik 3 жыл бұрын
which font do you use in your terminal?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Just the default. Looks like it's called SF Mono Regular 11
@sirajul-anik
@sirajul-anik 3 жыл бұрын
I used Fira Mono and Jetbrains Mono. Yours looks good as well.
@shuhampcpl6286
@shuhampcpl6286 3 жыл бұрын
How to run multiple project in nginx serve
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
This video will show you how to do that kzbin.info/www/bejne/hmi6ZZyPoKuUhbc
@hohojimmy4443
@hohojimmy4443 3 жыл бұрын
I don’t know which step have error when I curl IP address got my original code 😕
@hohojimmy4443
@hohojimmy4443 3 жыл бұрын
I have forget change the default name to index.php 😭
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Happy you figured it out
@gorillaau
@gorillaau 3 жыл бұрын
@@hohojimmy4443 We have all been there. :-)
@kinoko87_b
@kinoko87_b Жыл бұрын
If anybody else still had errors like me, you can probably fix it by putting this line on the top of the file, not inside any of the namespaces (not sure what the http, server, events things are called): user www-data www-data; this executes all the nginx operations and stuff with the permissions of www-data which is the user used for web developement usually. if you have set your user/group to something else change it accordingly in the user directive in your nginx config file its not best practice to set it as your own user as it might mess things up and even if you get it up and running--if you're not careful youre personal files such as the ones from Downloads/ can be accessed
@jogeshchandrabaidya1896
@jogeshchandrabaidya1896 11 ай бұрын
How Nginx remove .php extention
@bluefire8888
@bluefire8888 3 жыл бұрын
Could you please check nginx 1.20.1 and php8.0-fpm ? i try to install it , but it des not work
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Why not?
@diegoslinger1254
@diegoslinger1254 3 жыл бұрын
This dude is good
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks :)
@andresdemillos01
@andresdemillos01 Жыл бұрын
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?.
@PikBo100
@PikBo100 3 жыл бұрын
after install nginx i have this error This site can’t be reached so i cant open my website
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Check your nginx log for clues as to why at /var/log
@PikBo100
@PikBo100 3 жыл бұрын
@@TonyTeachesTech was problem with firewall in terminal i wrote 4 commands for input and output of port 80 and 443 to allow and all fixed
@gogogogogogogogogogog9
@gogogogogogogogogogog9 3 жыл бұрын
i did the same as you did but the index.php is a blank page !
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hmm, I don't know why that would happen
@JkeyKong
@JkeyKong Жыл бұрын
thanks got it
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
You're welcome!
@denysbarzynskyi2494
@denysbarzynskyi2494 3 жыл бұрын
Thanks you I’ll add this video to bookmarks. Thanks for your work. You are the best! 💪🏻💪🏻💪🏻
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Excellent, you're welcome!
@Nobody-df7vn
@Nobody-df7vn 3 жыл бұрын
403 Error...
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Double check that the path in your Nginx config file to your PHP actually exists. You might have a different version of PHP installed
@Nobody-df7vn
@Nobody-df7vn 3 жыл бұрын
@@TonyTeachesTech I fixed it. I put an extra space and it didn't work. Thanks!
@PlayhouseMediaGroup
@PlayhouseMediaGroup 3 жыл бұрын
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.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hi, I do have a video about multiple website on Nginx kzbin.info/www/bejne/hmi6ZZyPoKuUhbc and another on GCP kzbin.info/www/bejne/nGaZgXptht2dfKs Both of these use SSH to interact with the websites (my preference), but I can definitely make a video about FTP in the future
@inspirer4465
@inspirer4465 3 жыл бұрын
Works ty ty
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@unnip9802
@unnip9802 11 ай бұрын
Thankyou so much
@TonyTeachesTech
@TonyTeachesTech 11 ай бұрын
Most welcome 😊
@CiroPeixoto
@CiroPeixoto 2 жыл бұрын
Thanks !!!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@MasterPimp94v1
@MasterPimp94v1 3 жыл бұрын
thank you
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Welcome!
@-themixchannel2290
@-themixchannel2290 2 жыл бұрын
thanks
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
No problem
@Minhazmohamed
@Minhazmohamed Жыл бұрын
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; }
@JeffreyLopez-m2k
@JeffreyLopez-m2k 2 ай бұрын
Johnson Thomas Garcia Larry Hernandez Linda
@stevemcqueen2887
@stevemcqueen2887 24 күн бұрын
pointless without showing us how to configure https on nginx and wordpress
@ankitrathore3946
@ankitrathore3946 2 жыл бұрын
BC you broke my system
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Uh oh :(
@veltive3268
@veltive3268 Жыл бұрын
I keep getting this error: "bash: php8.0-fpm: command not found" I am able to start php8.0-fpm service, but I don't get any detailed output, and php-fpm wont seem to start running on port 9000. I'm having a really difficult time figuring out what's happening. root@ebe9bfc1d0cf:/var/www/html# service php8.0-fpm status * php-fpm8.0 is running root@ebe9bfc1d0cf:/var/www/html# ps -waux | grep php root 627 0.0 0.2 247692 12352 ? Ss <a href="#" class="seekto" data-time="1221">20:21</a> <a href="#" class="seekto" data-time="0">0:00</a> php-fpm: master process (/etc/php/8.0/fpm/php-fpm.conf) www-data 628 0.0 0.2 248000 17132 ? S <a href="#" class="seekto" data-time="1221">20:21</a> <a href="#" class="seekto" data-time="0">0:00</a> php-fpm: pool www www-data 629 0.0 0.2 248000 17132 ? S <a href="#" class="seekto" data-time="1221">20:21</a> <a href="#" class="seekto" data-time="0">0:00</a> php-fpm: pool www root 667 0.0 0.0 3468 1640 pts/1 S+ <a href="#" class="seekto" data-time="1225">20:25</a> <a href="#" class="seekto" data-time="0">0:00</a> grep --color=auto php root@ebe9bfc1d0cf:/var/www/html# netstat -an | grep :9000 root@ebe9bfc1d0cf:/var/www/html#
@Maximilyan29
@Maximilyan29 3 жыл бұрын
Неплохо
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks
@lynic-0091
@lynic-0091 2 жыл бұрын
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.
@FrissOderLassEs
@FrissOderLassEs Жыл бұрын
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.
The NGINX Crash Course
50:53
Laith Academy
Рет қаралды 499 М.
NGINX Linux Server | Common Configurations
17:28
Akamai Developer
Рет қаралды 186 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
All you need to know about FastCGI Process Manager (FPM)
12:44
Daniel Persson
Рет қаралды 17 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
How to Configure PHP (and PHP-FPM) for Apache on Ubuntu
10:29
Tony Teaches Tech
Рет қаралды 35 М.
PHP Docker Tutorial - Nginx - PHPFPM VS Apache - Full PHP 8 Tutorial
14:39
Install & Setup PHP and Nginx on Ubuntu Linux with FPM
11:16
Cameron McKenzie
Рет қаралды 18 М.
Why is My Webserver Hanging?!? (Spoiler: It was PHP-FPM)
9:31
Shawn Powers
Рет қаралды 7 М.
How to Password Protect Nginx with Basic Authentication
6:16
Tony Teaches Tech
Рет қаралды 22 М.
Learn Proper NGINX Configuration Context Logic
12:56
NGINX
Рет қаралды 49 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН