V
V
Vlad Osadchyi2019-09-07 19:33:00
Apache HTTP Server
Vlad Osadchyi, 2019-09-07 19:33:00

Why don't Apache virtual hosts work on digital ocean?

I did everything according to this instruction
https://www.digitalocean.com/community/tutorials/a...
But it always works, only one address (the one that is by default)
5d73daa92419f716869890.png
I just started to deal with apache today, so I don’t really understand what files to attach to the question
These are the configs in sites-available

spoiler

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName semivori.tk
    ServerAlias www.semivori.tk
    DocumentRoot /var/www/semivori.tk/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName semivoriii.tk
    ServerAlias www.semivoriii.tk
    DocumentRoot /var/www/semivoriii.tk/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


Perhaps the problem is that on freenom on all domains there is a redirect to IP?)
UPD: as I thought, the problem is redirecting to IP. Solution: install DigitalOcean's nameservers at the domain registrar

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question