Paolito75
Paolito75

Reputation: 568

Apache - Apache2 Debian Default Page instead of my website

I have an Apache 2 on Debian and am a beginner (newbie). When accessing to my webserver in the web brower, I get the Apache default welcome page :

enter image description here

Instead of this page (located in var/www/html), I try to make my real website displayed (var/www/mywebsite.com/). Below is the tree on my server :

---- etc
-------- apache2
------------ sites-enabled
---------------- mywebsite.com.vhost -> etc/apache2/sites-available/mywebsite.com.vhost
------------ sites-available
---------------- mywebsite.com.vhost

---- var
-------- www
------------ mywebsite.com
---------------- web
-------------------- css/
-------------------- js/
-------------------- img/
-------------------- error/
-------------------- index.html
-------------------- robots.txt

My .vhost file is well configurated :

AllowOverride None
Require all denied

DocumentRoot /var/www/mywebsite.com

ServerName mywebsite.com
ServerAlias www.mywebsite.com
ServerAdmin [email protected]

ErrorLog /var/log/ispconfig/httpd/mywebsite.com/error.log

Alias /error/ "/var/www/mywebsite.com/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html


<Directory /var/www/mywebsite.com/web>

    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted.

</Directory>

.. and I made a restart Apache. No success ! The Apache default page is still here. What am I missing ?

Upvotes: 6

Views: 31008

Answers (5)

project_2501
project_2501

Reputation: 11

You don't need to remove anything. You could simply update the index.html with new html/css/js content. Keep in mind changes will not reflect until you restart your Debian. There is an option to see the update instantly but it is another command.

Upvotes: 0

Neel G Patel
Neel G Patel

Reputation: 11

To Delete index.html

Your index.html located at /var/www/html

  1. cd /var/www/html
  2. sudo chown -R whoami /var/www/html
  3. rm index.html
  4. ls

Upvotes: 1

Ziad_ETC
Ziad_ETC

Reputation: 1

just remove these two files index.html and index.nginx-debian.html from this path /var/www/html ....Good

Upvotes: 0

Paolito75
Paolito75

Reputation: 568

I found a solution.

The only *.conf file loaded by Apache was etc/apache2/sites-available/000-default.conf, then I worked on this file to get my issue solved.

Hope that will help someone in the future !

Upvotes: 1

Ben
Ben

Reputation: 5139

Your index.html located at /var/www/mywebsite.com/web, I guess this is the website root folder? Try this config:

DocumentRoot /var/www/mywebsite.com/web

Upvotes: 0

Related Questions