V
V
Vernal962019-10-07 14:25:09
Apache HTTP Server
Vernal96, 2019-10-07 14:25:09

Why does the apache start page run on the server instead of a specific site?

I need to set up a server for website hosting.

Everything seemed to be done as it should:
I added the paths for the site to the apache virtualhost config
:

/var/www/mysitename1.org/public_html

site config file:
<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName mysitename1.org
    ServerAlias www.mysitename1.org
    DocumentRoot /var/www/mysitename1.org/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


Since the test site in hosts on windows registered the address
xxx.xxx.xxx.xxx mysitename1.org

but instead of the content of this address, I get the Apache start page:
/var/www/html/index.html


registered sudo a2ensite mysitename1.org.conf
registered sudo a2ensite mysitename1.org

reload did

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Lyskov, 2019-10-07
@Vlatqa

a2ensite

R
Ruslan Fedoseev, 2019-10-07
@martin74ua

read the apache config carefully.
There is most likely a directive for the directory / that prohibits it, and below there is a directive for /var/www/html that allows it to be accessed...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question