Answer the question
In order to leave comments, you need to log in
How to bind subdomain to desired folder in /home/folder/html in linux?
Good afternoon.
I have several subdomains and I indicated the IP of my server in the records and it goes, but it opens not the directory that I need, but the standard /var/www/html
You just need to place several sites in the /home/ folder and bind your subdomain to each . I don't understand why it doesn't work. I tried to make virtual servers through webmin and there I specified a subdomain in the Address and pointed further to the Document Root Directory.
I'm doing something wrong...
Answer the question
In order to leave comments, you need to log in
There are several options:
1) Cut pictures on the server when loading to the desired proportions.
2) Make the image width and height not less than the desired size, (min- to help) and overflow: hidden for the wrapper block, the block, respectively, to the desired size.
3) ready-made solutions for wrapping pictures, like googlemages.
A subdomain is no different from a domain in terms of hosting; it is a separate domain name.
It is bound in the same way as a regular domain.
https://youtu.be/R3MuX9sGLZs
to the /var/www/html folder - leads the "default host", that is, it is something like dev zero, but for the web, this is a trash can, any domain goes here.
This is done for two reasons.
1. quick start because the website is available on any domain, on any IP, etc.
because this site is not sorted by domain"
2. the reason you need this one is /dev/null But if you want to create a second site, in your case it's
a
subdomain, but there's no difference.
and folders.
To do this, you need to create a separate virtual host, in fact, in theory, the site should be like this
/ var / www / html - the trash can here is the html file hello, you got to the server.
/var/www/site.ru - site 1
/var/www/site2.ru - second site
/home/site3.ru - site in another folder, etc.
as you can see /var/www/html is not used at all.
In general, watch the video there everything is there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question