How to Host Multiple WordPress Websites on One Server with Nginx

  Рет қаралды 39,411

Tony Teaches Tech

Tony Teaches Tech

Күн бұрын

Пікірлер: 128
@vanvuite7307
@vanvuite7307 3 жыл бұрын
I thought Superman was only in a movie, you just proved we have a living Superman - I found you now! thank you!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Haha thanks!!
@helmholtzwatson8884
@helmholtzwatson8884 4 жыл бұрын
Thanks for a great tutorial. I'm just starting to explore nginx and this is very useful. In case you don't know, the problem you had with vim not replacing all instances of 'site2' in site3.xyz.conf is probably due to you using search and replace the same way copying site1.xyz.conf to site2.xyz.conf. The way you wrote it, it only changes the first instance on a line. That's why you had a 'site1' left over. To replace all instances, use the global tag: ':%s/site1/site2/g' That error got carried over to site3.xyz.conf. You fixed that but you may still have the original error in site2.xyz.conf if you haven't already fixed it.
@TonyTeachesTech
@TonyTeachesTech 4 жыл бұрын
Yeah you're right! The find and replace command should have been.... %s/site2/site3/g Thanks for the feedback on the video! I have a bunch of other Nginx videos on my channel kzbin.info/door/WPJwoVXJhv0-ucr3pUs1dAsearch?query=nginx and I'm working on some new Nginx videos right now!
@ShibuHara
@ShibuHara 3 жыл бұрын
This was super helpful, thank you! I like that you leave your little stumbles in the video too, makes you come across as very likable and approachable :) Subscribed!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Appreciate it 🙏
@harmonymoyo4420
@harmonymoyo4420 Жыл бұрын
Man you're such a great teacher, thank you for the clear explaination and nice clear step by step demo.
@mohamedtadwala0
@mohamedtadwala0 Жыл бұрын
Hi Tony. You know whenever you doing videos and you are using the terminal, I suggest that you keep the terminal a bit up. Because when I pause the video to see the command. the KZbin bar comes up and blocks the view. To understand better watch this video and then pause the video at 10:23 and you will know what I am talking about. By the way great tutorial videos. keep it up.
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Thanks, others have pointed this out and my newer videos have been adjusted accordingly. Sorry for the inconvenience!
@NagenderGiri
@NagenderGiri 3 жыл бұрын
you stumbled for writing privileges... i loved that... and on that tone.. subscribed
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thank you very much!
@DappledJoker
@DappledJoker 11 ай бұрын
😃 Thank you so much! Really helpful. Would you please consider in future videos that involve a CLI, placing your monitor feed to the top right of the video so that we can see the whole command you enter? It's blocked when your monitor feed is in the lower right.
@andersonfornalski1944
@andersonfornalski1944 3 жыл бұрын
Tony, você me salvou, obrigado pela ajuda, estava com muitos problemas aqui, sou brasileiro e nao achei nenhum video aqui para me ajudar!! ============================================================== Tony, you saved me, thanks for the help, I was having a lot of problems here, i`m brasilian e nao achei nenhum video aqui para me ajudar!!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome. Thanks for watching :)
@GabrielBarbosa-yp4vy
@GabrielBarbosa-yp4vy 2 жыл бұрын
Following the idea of this video, I would love to watch another video from you giving a deeper explanation about how you configured nginx and mysql =)
@hassamulhaq7762
@hassamulhaq7762 2 жыл бұрын
I use virtualmin as free cPanel alternative with Nginx. Using this we can manage multiple sites, mails and all features of a control panel.
@alexk9513
@alexk9513 3 жыл бұрын
Hi, 很高興在你的頻道上學了很多知識, 謝謝你, 看了你的 BLOG 歡迎你到台灣來旅遊.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hi! You're very welcome
@berthasebastian1490
@berthasebastian1490 Жыл бұрын
Hi Tony, I was wondering if you could give me your thoughts on using this approach (linode) to host wp sites than other web hosters such as siteground, bluehost and the myriad of others? One cheapest server could be $5/mo on linode but for siteground at least, my yearly cost comes to $300ish. In my understanding, I could save a lot just by doing this approach. Thanks!
@sokhakho7154
@sokhakho7154 3 жыл бұрын
sir, may you tell me about Nginx and caddy webserver which is better I should use for my web hosting?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I don't know much about Caddy, sorry
@chenghuayang8273
@chenghuayang8273 3 жыл бұрын
May I ask if I build sites by Docker with different WordPress container, and use Nginx to direct to different port # in VPS, is there any difference between this and your way?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I'm not familiar enough with Docker to answer that
@mohamednabil542
@mohamednabil542 Жыл бұрын
Hi Tony, thanks for this great video, after following the steps and at the point of having the WP installation starts, the setup screen is not showing instead I have a pop-up asking me to download the install.php file. Note that, the first site is working with no issue, the second one is having this issue (I have only 2 sites) any help on this? Thanks
@_zh3ro_
@_zh3ro_ 3 жыл бұрын
GREAT video! Thank you so much!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad it was helpful!
@SamiKhan-fd8gn
@SamiKhan-fd8gn Жыл бұрын
Tony I have a question, I have configured multiple sites in this way. How do I install an SMTP server in this machine which can server all of these sites.
@blackiek7
@blackiek7 2 жыл бұрын
Hi Tony, can we connect a cpanel like hestia with the oracle free tier? I’m using a mac but i can’t seem to understand how to generate a private key from the ssh using terminal putty gen command. Would you be able to do a video tutorial on this?
@TobyDunn-jd1jl
@TobyDunn-jd1jl Жыл бұрын
Well done!
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Thanks Toby
@Matfi93
@Matfi93 10 ай бұрын
Thank you Tony!
@TonyTeachesTech
@TonyTeachesTech 10 ай бұрын
My pleasure!
@NagenderGiri
@NagenderGiri 3 жыл бұрын
your nginx video is really fantastic..i love your work.. but also,, could you do this on podman container with specific port..that'll be good to know
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I'm not familiar with podman containers, what's that?
@sarvagyamaithani2093
@sarvagyamaithani2093 2 жыл бұрын
how did you get the conf file for site 1 & 2 directly on the sites-available directory. I only have the default one there. Can I copy that with a new name for my website
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Yes exactly
@kapitankidlattv9613
@kapitankidlattv9613 2 жыл бұрын
Tony, can this procedure be applied to say hmm different type of site, say one site is WP, then I have web app in python+ django. Or is this exclusively for WP sites only?
@khalidelgazzar
@khalidelgazzar 4 жыл бұрын
Great video .. a small glitch in 9:30 where the conf file contained site2 by mistake which needs to be changed to site2 as well. Still a great video
@TonyTeachesTech
@TonyTeachesTech 4 жыл бұрын
Good catch!
@timlan165
@timlan165 Жыл бұрын
wtf ?
@lylefabian1691
@lylefabian1691 2 жыл бұрын
Hello Tony, I'd like to see how Nginx and WordPress can be installed on an UnRaid server via docker? I've been searching for ways of getting this done but found no real step by steps tutorials.
@kernag7688
@kernag7688 2 жыл бұрын
Tony, can you please make a video on how to pull down an application from git on new Vultr server?
@magicyvan
@magicyvan 2 жыл бұрын
Hi Tony, thanks a lot, I'm beginner but I love this possibility ! I would love to help friends and host their WP websites. Would it be more efficient to use dockers for each new website to deploy ? and for the ssl also ? Thanks
@tiosing_eduard1
@tiosing_eduard1 3 жыл бұрын
so if I run a multiple website on one web server it will means all website I link in on my web server is shared on the capacity of the web server storage disk? I hope you understand what I mean... Couse I was now good in English... thank you so much for sharing informative video tutorial!!! I love it!!!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thank you very much. To answer your question: yes when you have multiple websites on the same server, the storage capacity as well as the processing power is shared between all websites on the server.
@kapitankidlattv9613
@kapitankidlattv9613 2 жыл бұрын
Tony, god day, how can we get rid of the extra /wordpress/ directory?\
@irmscher9
@irmscher9 3 жыл бұрын
Is there any benefit of serving Wordpress with Docker? Or does Nginx has to be dockerized then as well? PS. Thanks a lot for this very useful video by the way :)
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Not sure, I'm not too familiar with Docker yet
@yangjiao9136
@yangjiao9136 3 жыл бұрын
Thanks for the tutorial! I have a question. I already installed a wordpress using the WordPress Application on a Vultr vps, and I was trying to add another wordpress site to the same server. By 8'57" of the video, after I typed "/etc/nginx# cd sites-available/", the terminal told me "No such file or directory" . I suddently don't know what to do. Should I create a directory? Any help is appreciated!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Try to access the directory with an absolute path: cd /etc/nginx/sites-available/
@donny533
@donny533 10 ай бұрын
so every site needs its own WP? not something like, a vim for all users?
@KentJudeBeldeniza1818
@KentJudeBeldeniza1818 3 жыл бұрын
Thanks for this!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sure thing!
@abelmurua6980
@abelmurua6980 3 жыл бұрын
Thanks for the video. How many websites can I host under a VPS doing this? Is this like "messing with the server" or its how it's supposed to do it? I am new to this and I am moving from Cloud Server to VPS
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
This is a very legit thing to do. It's not messing with the server. You can host many websites like this on a single server. I don't have an exact number. This will depend on the RAM and CPU of your VPS
@abelmurua6980
@abelmurua6980 3 жыл бұрын
@@TonyTeachesTech thanks, I appreciate your answer.
@afelfemale
@afelfemale 3 жыл бұрын
@@TonyTeachesTech Hey Tony, how does Hosting Multiple WordPress Websites on One Server with Nginx effects SEO ranking? Do have experience with this? 😊 Is it safe?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@afelfemale There's no effect on SEO rankings
@seopostoffer205
@seopostoffer205 3 жыл бұрын
Hi Tony ,How to install Wordpress on docker compose and using Nginx web server. Please advice thank you so much.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hi, I am not yet familiar with docker. Soon though :)
@metamask0x
@metamask0x 8 ай бұрын
How do i host different website using the domainname but different ports ? one is port 80 another is port 5080 ?
@ChrisMinardi
@ChrisMinardi 3 жыл бұрын
Hey Tony, great video! Followed all of the steps to a T, but I'm getting a Bad Gateway error. Any easy fix for that? Thanks!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
This is usually an issue with the "upstream" server. Are you sure that your PHP FPM socket exists at /var/run/php/php7.2-fpm.sock ? Perhaps you have a different version of PHP installed. Please let me know if that helps or if that doesn't make sense.
@Than3Dane
@Than3Dane Жыл бұрын
Hey Tony, I'm almost done setting up my two websites on each their raspberry pi on the same public ip using your guidance so far. First site and server runs fine when port forward routed on the router, I routed that to the second site, messed around with reverse proxy/load balancing, trying to redirect access to 1st site server, but suddenly site 2 would load a result. Now both sites are setup with wordpress, but I just cannot figure out how to route the connection from site 2 to site 1. They each have their own specific domain address
@Than3Dane
@Than3Dane Жыл бұрын
on site 2 which should act as the proxy, I have 3 .conf files one for each domain and one for the proxy settings, when I edit and I'm looking at the .conf file which belongs to site 1, I can see changes on load, but theres a conflict either with finding content or ssl, depending on what changes I make. So that proves there is atleast a connection going on, they are interacting/communicating, just a small hiccup I suppose. If you have a moment, I'm all ears & eyes! Merry Christmas
@DOCGaming911YT
@DOCGaming911YT Жыл бұрын
do you have video on how to install cloudpanel?
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
No sorry
@petertremblay3725
@petertremblay3725 2 жыл бұрын
Hi Tony, does nginx root have to be var/www since i was trying to point the root to /home/username/website_01 and it doesn't load the page?
@dj786jojo
@dj786jojo Жыл бұрын
hi tony, thx for you tutorial, but i have question iI followed your tutorial and missed nothing but I run into my website 403 Not Found nginx/1.18.0 (Ubuntu) maybe you can give info why it happened i placed the file in /var/www/html/mydomain.tld conf file in /etc/nginx/sites-available/mydomain.tld.conf then i link ln -s /etc/nginx/sites-available/mydomain.tld.my.id.conf /etc/nginx/sites-enabled/
@jinu.freelance
@jinu.freelance 3 жыл бұрын
What kind of language is used to get these this..? How can i learn what to type and do this..?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
What do you mean by that?
@karaipantsu1312
@karaipantsu1312 3 жыл бұрын
Great video! So how do you transfer files from hard drive into the nginx environment? Would rsync work in this case?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Yes, you could use rsync. SCP is another option: - If you are on Mac/Linux: kzbin.info/www/bejne/p2Oyeamip5VrZ9U - If you are on Windows: kzbin.info/www/bejne/rWK3oqVtjNBol7c
@karaipantsu1312
@karaipantsu1312 3 жыл бұрын
@@TonyTeachesTech ah very nice! Thank you! And the curly thing at prompt is a "tilde" hehe
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@karaipantsu1312 Sure thing Melanie. Yes, that's it 😉
@mluevanos
@mluevanos 4 жыл бұрын
How would I get a Node.js App and Wordpress running on Ubuntu Digital Ocean?
@TonyTeachesTech
@TonyTeachesTech 4 жыл бұрын
Digital Ocean has some of the best tutorials available for so many different hosting topics. Check this one out for your specific setup... www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-20-04 You would simple set up WordPress as instructed in this video and then create another directory (/var/www/nodejsapp/ for example) and edit your Nginx configuration file to point to that path. Does that make sense?
@kyuna4843
@kyuna4843 3 жыл бұрын
kzbin.info/www/bejne/eGeVgoaYhc2bZ9U
@satishkumarojha5377
@satishkumarojha5377 3 жыл бұрын
Do I have to install phpmyadmin separately for each individual WordPress...?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
No, you'll only need one install of phpmyadmin for multiple websites
@soldadopreciso
@soldadopreciso Жыл бұрын
5:09 But if i want to use my normal user and not root, How can we do?
@axelrocky5372
@axelrocky5372 3 жыл бұрын
thank you a lot that's a valuable lesson for me, just have 1 question, i do everything as you did step by step, but i have a 403 error forbidden, i google it and it seems like to be that nginx doesnt found an index.php file, but is there inside my wordpress directory hummmmm so iam still looking for that thank you again :D
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Can you confirm that the index directive in your Nginx config file is index.php (not index.html) and your root directive in your Nginx config file is the full path to WordPress? Another issue might be permissions... find /var/www/html/ -type d -exec chmod 755 {} \; find /var/www/html/ -type f -exec chmod 644 {} \; Please let me know if one of those works for you.
@axelrocky5372
@axelrocky5372 3 жыл бұрын
@@TonyTeachesTech after a couple of days, it finally finds it, I have checked the permissions and paths as you suggested, then I found it to be the ownership, which was as nobody: nogroup change it to root and voila! Thank you Tony :D
@themobileinternet991
@themobileinternet991 2 жыл бұрын
I had the same error, permissions were fine, but I did have to add index index.php in my wesite.conf file, that seemed to fix it.
@KaydotOrigin
@KaydotOrigin 3 жыл бұрын
This would be a top notch tutorial and educational video if it was complete. But there is no SSL here, theres no mention of the loss of encryption between the proxy and the site and how to do this in production not local development
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I have a few other videos on this channel in regards to setting up SSL on Nginx
@SprintsNClimbs
@SprintsNClimbs Жыл бұрын
Just to share an issue I had when getting a 403 Forbidden error. The autoindex module didn't seem to be working which apparently allows Nginx to generate and serve an index of the files and directories within a given directory if an index file (like index.html or index.php) is not present. Without this module, Nginx will return a "403 Forbidden" error when it is asked to serve a directory without an index file. So to fix this I just added the following line in my .conf file 'index index.php index.html index.htm;' after the server_name line. Hope this helps someone
@zagamerx7348
@zagamerx7348 Жыл бұрын
Hey there, i got this error too... Which config file you mean? Nginx.conf or site.xyz.conf or the default in sites available
@atulhostvideos
@atulhostvideos 4 жыл бұрын
Salt keys are nothing but a secure way of encrypting logged in sessions.
@TonyTeachesTech
@TonyTeachesTech 4 жыл бұрын
Thanks for explaining
@akramsuleyman1567
@akramsuleyman1567 2 жыл бұрын
You forgot to put the global option '/g' on the substitute command in vim that's why 'site1' wasn't changed :)
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Good call :)
@dhiyaaulauliyaa3988
@dhiyaaulauliyaa3988 4 жыл бұрын
I get "Error establishing a database connection". I can assure that the mysql db, user, and password not wrong. anybody has experienced this?
@TonyTeachesTech
@TonyTeachesTech 4 жыл бұрын
At what point do you get this error?
@rayoseldev819
@rayoseldev819 3 жыл бұрын
I have permission acces problem You don't have permission to access / on this server.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
This sounds like you will need to prefix your commands with sudo or use a different user that has the appropriate permissions. BTW, why do you need permissions to access /? You shouldn't be creating or modifying anything in the root of your server
@rayoseldev819
@rayoseldev819 3 жыл бұрын
@@TonyTeachesTech I put the server in conf.g and all works
@christopherrimplington3643
@christopherrimplington3643 2 жыл бұрын
Same video but in "non-nerd" would be great
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Haha sorry that's just the nature of the topic
@quissy5923
@quissy5923 2 жыл бұрын
use open windows we are not all coders stressed!!
@FabioGMartinez
@FabioGMartinez 2 жыл бұрын
Amazing. Are you human? 😁 thanks
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thanks Fabio
@aldrinwong6160
@aldrinwong6160 8 ай бұрын
Title is misleading. Should say how to add another website to a previously hosted server using Nginx. All you did is copy and paste what you had in the server already.
@Kaotix_music
@Kaotix_music Ай бұрын
‘How to host multiple Wordpress websites on nginx” what’s so misleading about that? He literally showed how to have multiple websites, based on Wordpress, on the same server. If you want to take a website and migrate it, follow his steps, make a Wordpress for the new site, and go on the ‘previous hosted site’ and download all its contents, but it in the new one you made, changed the A records for the domain, you’re done. But you assumed this was a migration tutorial, when it showed how to start a ‘new’ site…but some rules apply just use Wordpress import/export feature to take from the old and put on the new
@finnteuwsen3789
@finnteuwsen3789 3 жыл бұрын
403 forbidden
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Please see this video to solve the 403 error kzbin.info/www/bejne/ZmK3Zn2AfLxnlcU
@GiridharVedula
@GiridharVedula 2 жыл бұрын
Who to do with Joomla. (Joomla, Nginx, CentOS, MariaDB
@paperlanes07
@paperlanes07 3 жыл бұрын
How can I do this using docker containers and nginx proxy?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I'm not familiar with docker yet
The NGINX Crash Course
50:53
Laith Academy
Рет қаралды 495 М.
How to Host Multiple WordPress Websites on One Server with Apache
12:08
Tony Teaches Tech
Рет қаралды 27 М.
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН
Человек паук уже не тот
00:32
Miracle
Рет қаралды 3,7 МЛН
NGINX Tutorial - What is Nginx
14:32
TechWorld with Nana
Рет қаралды 247 М.
How to Host Your Own Email Server (for free)
22:52
Tony Teaches Tech
Рет қаралды 302 М.
Point an NGINX Reverse Proxy to Wordpress Running on Docker
15:41
DevbaseMedia
Рет қаралды 16 М.