Apache - Apache2 Debian Default Page instead of my website

16,597

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
Share:
16,597
Paolito75
Author by

Paolito75

Updated on June 04, 2022

Comments

  • Paolito75
    Paolito75 about 2 years

    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 ?