Answer the question
In order to leave comments, you need to log in
VPS. How to configure Apache correctly so that it opens not localhost, but a specific url?
Tell me, there is a VPS. How to configure Apache correctly so that it opens not localhost, but a specific url?
config:
<VirtualHost *:80>
ServerName *IP*
ServerAlias www.*IP*
DocumentRoot /var/www/project
<Directory /var/www/project>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
...
Answer the question
In order to leave comments, you need to log in
1. remove this machine to work with pure linux you don't have enough experience.
2. install bitrix VM
or vestacp
or braynicp
or God forbid ispmanager
(all of them are installed in 1 click)
, in fact, they will deal with all this crap for you, and you will not lose anything in performance.
And the point here is not Apache, but the fact that there are dozens of demons on the web server and they need to be configured
starting from bind ending with letsencrypt where it’s easier to take an already working system.
If you are interested in understanding then ispconfig3 (not to be confused with ispmanager)
Your question is:
everything is not a localhost you have a default config that performs /dev/null functions only for a web site that says "any domain".
for your site, you need to specify the domain explicitly.
that is, you create a separate config with separate settings and apply it.
After that, unparsed requests go to the default config, and what you need is through an explicitly designated domain.
Actually everything.
By going to any domain that will lead to this server, both technical and ordinary, and ip in addition. you will be taken to the local dev zero. that is, in the default config.
But if you specify a special case, then you will get to a specific config and it will give you a different path.
ServerName naydikvartiru.ru
DocumentRoot /var/www/naydikvartiru/data/www/naydikvartiru.ru
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question