Nginx alias vs root... what's the difference?

  Рет қаралды 8,081

Tony Teaches Tech

Tony Teaches Tech

Күн бұрын

Find out what the difference is between the Nginx alias and root directives in a location block with a basic example.
Find more at tonyteaches.tech
Check out my vlog channel ‪@TonyFlorida‬
#nginx

Пікірлер: 37
@panchalhimself
@panchalhimself 3 жыл бұрын
Dude your teaching method is really great. Straight to the point no Bullshit. Keep making these videos man..
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I really appreciate that! Thank you for watching
@devn0n
@devn0n Жыл бұрын
Bruh, the quality of this video is epic...even on 1.75 speed everything is still very much clear!!! Thanks man!!!
@JohnGray-u7o
@JohnGray-u7o Жыл бұрын
Official nginx docs and ai model couldn't help but you did. Great content.
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Much appreciated!
@randomworld1
@randomworld1 Жыл бұрын
Nice demo buddy. Learnt a fundamental difference.
@10thcode
@10thcode Жыл бұрын
Man, you saved my life. Thanks
@imranhasan871
@imranhasan871 3 жыл бұрын
hi Tony it is great information you provide. I can't understand this topic for few days. but now I can understand this topic very clearly. carry on god bless you
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad it was helpful!
@ifebusolaogunbayo2823
@ifebusolaogunbayo2823 Жыл бұрын
Thank you Tony this was very helpful!
@LryuzakiLN
@LryuzakiLN 2 жыл бұрын
Hi Tony, could you please make a video on custom error pages? Like for example if I have a 404 error from a request the nginx should display my custom 404 error page and 500,502 etc some other custom page. Thanks!
@hoale9689
@hoale9689 Жыл бұрын
This video is so informative.
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Thanks!
@henrique1625
@henrique1625 Жыл бұрын
thank you, that was actually helpfull
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Glad it helped!
@giusti4612
@giusti4612 3 жыл бұрын
So did I understand this corrcetly lets assume I have a folder with 3 subfolders A, B, D To make the folder D avilable under /C for exmaple I would simply do location /C/ { alias /T/; } Do I need to define the /T/ location iteself?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
To make the folder D available at example.com/C, you would do: location /C { alias /D; } ...assuming your T is a typo and should be D
@ebiscaia
@ebiscaia 3 жыл бұрын
Thanks, mate Again spot on
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad to help
@rahulpardeshi56
@rahulpardeshi56 Жыл бұрын
Hey I am following same steps but getting 404 not found... What could be the reason please help
@ahmetozturk5178
@ahmetozturk5178 2 жыл бұрын
You helped me a lot thank you
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@rahulpardeshi56
@rahulpardeshi56 Жыл бұрын
Hi it's great video.... What if I don't want to mention index.html in browser path is there any way and I am getting 404 page not found error also😊
@kemaldursun8192
@kemaldursun8192 4 ай бұрын
thank u so much
@TonyTeachesTech
@TonyTeachesTech 4 ай бұрын
You are most welcome
@guneshpatil
@guneshpatil 4 ай бұрын
I am faced with a challenge with nginx config actually. - hosting grafana and influx in Docker on a Ubuntu instance - served on 2 different ports - machine is hosted on aws with a security group allowing 443 via our vpn now I wish to serve those on server/influx and server/grafana respectively. can anyone help me solve this?
@indian3960
@indian3960 3 жыл бұрын
could you please make that same thing for the website also? I mean, I have a website called Site1.com and I want to make the exact same website, that is called Site2.com Now whenever I upload or changes anything in SIte1.com it will automatically see from Site2.com also I also want to know how torrent websites make the same proxy websites.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
While this is possible, I would highly suggest not to do this, especially if you would like your website to rank in organic search results developers.google.com/search/docs/advanced/guidelines/duplicate-content Do you have a good reason for doing this?
@indian3960
@indian3960 3 жыл бұрын
See Tony, torrent websites get a lot of DMCA strikes then Google removes it. But you just search on google you see dozens of websites showing in results. So I just want to know how they make these. That's it. For educational purposes only.
@fox-99998
@fox-99998 3 жыл бұрын
Will the alias thing still work if you remove the root in the other location?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Yes, it will still work
@tiktacktoes
@tiktacktoes 2 жыл бұрын
hi, and thank you for the information. i tried the root and alias by making an index.html in a directory /root/git/user/web. However, when i tried to open it shows the 404 not found error. how can i fix this? thankyou
@rahulpardeshi56
@rahulpardeshi56 Жыл бұрын
Getting same error
@m4ynor
@m4ynor 2 жыл бұрын
Just thanks! 😏
@Monstajamsofficial
@Monstajamsofficial 3 жыл бұрын
Could you do a video of how to upgrade ubuntu server from 18.04 to 20.04. Thanks 😊
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
That's a great idea that I'm actually not sure how to do right now. I will do some research first!
@Monstajamsofficial
@Monstajamsofficial 3 жыл бұрын
@@TonyTeachesTech I can’t wait for the video 🥺
Настройка Nginx rewrite: основные правила и директива try_files
27:43
Поддержка Сайтов :: Метод Лаб
Рет қаралды 8 М.
NGINX с нуля до профи. Nginx что это, как работает, как парсит конфиги?
14:08
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 27 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 108 МЛН
Become a shell wizard in ~12 mins
12:25
CODE IS EVERYTHING
Рет қаралды 251 М.
How to Configure Server-Level Cache on Nginx (basic example)
9:51
Tony Teaches Tech
Рет қаралды 28 М.
NGINX Internal Architecture - Workers
15:07
Hussein Nasser
Рет қаралды 45 М.
Apache vs NGINX
7:53
IBM Technology
Рет қаралды 300 М.
Learn Proper NGINX Configuration Context Logic
12:56
NGINX
Рет қаралды 47 М.
The NGINX Crash Course
50:53
Laith Academy
Рет қаралды 490 М.
Nginx: настройка директивы location
11:59
Поддержка Сайтов :: Метод Лаб
Рет қаралды 20 М.
Nginx sites-available and sites-enabled
8:45
WittCode
Рет қаралды 6 М.
ЧТО ЕМУ СДЕЛАЛИ КОМАРЫ😳
0:28
FilmBytes
Рет қаралды 3,8 МЛН