Тёмный

How to Host Multiple WordPress Websites on One Server with Nginx 

Tony Teaches Tech
Подписаться 106 тыс.
Просмотров 38 тыс.
50% 1

Learn how to host multiple websites on a single IP address or server. This video will teach you the Nginx configuration settings necessary to run many WordPress websites on one hosting plan, each with their own domain name.
Need an Nginx LEMP server? • How to Install a LEMP ...
Find more at tonyteaches.tech/run-multiple...
Check out my vlog channel ‪@TonyFlorida‬
#nginx #wordpress

Хобби

Опубликовано:

 

7 авг 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 126   
@ShibuHara
@ShibuHara 2 года назад
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 2 года назад
Appreciate it 🙏
@harmonymoyo4420
@harmonymoyo4420 Год назад
Man you're such a great teacher, thank you for the clear explaination and nice clear step by step demo.
@vanvuite7307
@vanvuite7307 2 года назад
I thought Superman was only in a movie, you just proved we have a living Superman - I found you now! thank you!
@TonyTeachesTech
@TonyTeachesTech 2 года назад
Haha thanks!!
@_zh3ro_
@_zh3ro_ 3 года назад
GREAT video! Thank you so much!
@TonyTeachesTech
@TonyTeachesTech 3 года назад
Glad it was helpful!
@helmholtzwatson8884
@helmholtzwatson8884 3 года назад
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 3 года назад
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 ru-vid.com/show-UCWPJwoVXJhv0-ucr3pUs1dAsearch?query=nginx and I'm working on some new Nginx videos right now!
@GabrielBarbosa-yp4vy
@GabrielBarbosa-yp4vy Год назад
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 =)
@KentJudeBeldeniza1818
@KentJudeBeldeniza1818 3 года назад
Thanks for this!
@TonyTeachesTech
@TonyTeachesTech 3 года назад
Sure thing!
@Matfi93
@Matfi93 6 месяцев назад
Thank you Tony!
@TonyTeachesTech
@TonyTeachesTech 6 месяцев назад
My pleasure!
@blackiek7
@blackiek7 Год назад
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
@NagenderGiri
@NagenderGiri 2 года назад
you stumbled for writing privileges... i loved that... and on that tone.. subscribed
@TonyTeachesTech
@TonyTeachesTech 2 года назад
Thank you very much!
@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
@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
@kapitankidlattv9613
@kapitankidlattv9613 Год назад
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?
@alexk9513
@alexk9513 3 года назад
Hi, 很高興在你的頻道上學了很多知識, 謝謝你, 看了你的 BLOG 歡迎你到台灣來旅遊.
@TonyTeachesTech
@TonyTeachesTech 3 года назад
Hi! You're very welcome
@DappledJoker
@DappledJoker 7 месяцев назад
😃 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.
@lylefabian1691
@lylefabian1691 Год назад
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.
@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.
@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!
@petertremblay3725
@petertremblay3725 Год назад
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?
@kernag7688
@kernag7688 2 года назад
Tony, can you please make a video on how to pull down an application from git on new Vultr server?
@hassamulhaq7762
@hassamulhaq7762 Год назад
I use virtualmin as free cPanel alternative with Nginx. Using this we can manage multiple sites, mails and all features of a control panel.
@yangjiao9136
@yangjiao9136 2 года назад
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 2 года назад
Try to access the directory with an absolute path: cd /etc/nginx/sites-available/
@kapitankidlattv9613
@kapitankidlattv9613 Год назад
Tony, god day, how can we get rid of the extra /wordpress/ directory?\
@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 RU-vid 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!
@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
@andersonfornalski1944
@andersonfornalski1944 2 года назад
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 2 года назад
You're welcome. Thanks for watching :)
@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
@metamask0x
@metamask0x 5 месяцев назад
How do i host different website using the domainname but different ports ? one is port 80 another is port 5080 ?
@soldadopreciso
@soldadopreciso Год назад
5:09 But if i want to use my normal user and not root, How can we do?
@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
@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 :)
@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.
@NagenderGiri
@NagenderGiri 2 года назад
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 2 года назад
I'm not familiar with podman containers, what's that?
@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 2 года назад
I don't know much about Caddy, sorry
@donny533
@donny533 7 месяцев назад
so every site needs its own WP? not something like, a vim for all users?
@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 10 месяцев назад
Hey there, i got this error too... Which config file you mean? Nginx.conf or site.xyz.conf or the default in sites available
@karaipantsu9973
@karaipantsu9973 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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-q2OHvlr081s.html - If you are on Windows: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-w1Tqr7Wk5aU.html
@karaipantsu9973
@karaipantsu9973 3 года назад
@@TonyTeachesTech ah very nice! Thank you! And the curly thing at prompt is a "tilde" hehe
@TonyTeachesTech
@TonyTeachesTech 3 года назад
@@karaipantsu9973 Sure thing Melanie. Yes, that's it 😉
@mluevanos
@mluevanos 3 года назад
How would I get a Node.js App and Wordpress running on Ubuntu Digital Ocean?
@TonyTeachesTech
@TonyTeachesTech 3 года назад
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 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-B62QSbPhh1s.html
@khalidelgazzar
@khalidelgazzar 3 года назад
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 3 года назад
Good catch!
@timlan165
@timlan165 Год назад
wtf ?
@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
@DOCGaming911YT
@DOCGaming911YT 11 месяцев назад
do you have video on how to install cloudpanel?
@TonyTeachesTech
@TonyTeachesTech 11 месяцев назад
No sorry
@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.
@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
@jinuvarghese671
@jinuvarghese671 2 года назад
What kind of language is used to get these this..? How can i learn what to type and do this..?
@TonyTeachesTech
@TonyTeachesTech 2 года назад
What do you mean by that?
@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 2 года назад
@@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 2 года назад
@@afelfemale There's no effect on SEO rankings
@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.
@dhiyaaulauliyaa3988
@dhiyaaulauliyaa3988 3 года назад
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 3 года назад
At what point do you get this error?
@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/
@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
@paperlanes07
@paperlanes07 3 года назад
How can I do this using docker containers and nginx proxy?
@TonyTeachesTech
@TonyTeachesTech 3 года назад
I'm not familiar with docker yet
@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 :)
@atulhostdotcom
@atulhostdotcom 3 года назад
Salt keys are nothing but a secure way of encrypting logged in sessions.
@TonyTeachesTech
@TonyTeachesTech 3 года назад
Thanks for explaining
@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
@FabioGMartinez
@FabioGMartinez 2 года назад
Amazing. Are you human? 😁 thanks
@TonyTeachesTech
@TonyTeachesTech 2 года назад
Thanks Fabio
@quissy5923
@quissy5923 2 года назад
use open windows we are not all coders stressed!!
@aldrinwong6160
@aldrinwong6160 5 месяцев назад
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.
@finnteuwsen3789
@finnteuwsen3789 3 года назад
403 forbidden
@TonyTeachesTech
@TonyTeachesTech 3 года назад
Please see this video to solve the 403 error ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-01T5JJGW4_c.html
@GiridharVedula
@GiridharVedula Год назад
Who to do with Joomla. (Joomla, Nginx, CentOS, MariaDB
Далее
Apache vs NGINX
7:53
Просмотров 266 тыс.
Quick and Easy Local SSL Certificates for Your Homelab!
12:08
How to host multiple websites on Nginx
4:39
Просмотров 4,7 тыс.
How to put a WordPress Website on Contabo
13:36
Просмотров 21 тыс.
How to Host Multiple Websites on One Server
7:00
Просмотров 9 тыс.
СЕРЕГА ЕЛЫ ПАЛЫ СКОНЧАЛСЯ!!!
0:59