0

i am trying to install my website on apache 2 on debian 9 using webmin but the problem is website keeps redirect to index.html file from apache's default

in /etc/apache2/sites-available i have niaqo.com.conf which contains this code

<VirtualHost *>
DocumentRoot "/var/www/html/niaqo.com"
ServerName niaqo.com
ServerAdmin webmaster@localhost
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
<Directory "/var/www/html/niaqo.com">
allow from all
Options None
Require all granted
</Directory>
</VirtualHost>

in /etc/apache2/sites-enabled also has same file as top niaqo.com.conf which has these code

<VirtualHost *>
    DocumentRoot "/var/www/html/niaqo.com"
    ServerName niaqo.com
    ServerAdmin webmaster@localhost
    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined
    <Directory "/var/www/html/niaqo.com">
    allow from all
    Options None
    Require all granted
    </Directory>
</VirtualHost>

any kind of help is appreciated since i am new with this..i already configures my bind using webmin correctly cause when i go intodns.com/niaqo.com i can see that domain names set correctly whenever i open the website it keeps redirecting me to /var/www/html and shows me default html page from apache2 with https.which i don't even need https on this website since i don't have ssl cert

HiDd3N
  • 121
  • 4

1 Answers1

0

Are there any other files in /etc/apache2/sites-available? For example, 000-default.conf. Or a similar filename with default in it. It is the Apache default virtual host configuration file and, if you don't need it, disable it with sudo a2dissite:
sudo a2dissite 000-default.conf

Andra
  • 115
  • 1
  • 1
  • 6