Reputation: 568
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 :
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
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
Reputation: 11
To Delete index.html
Your index.html
located at /var/www/html
cd /var/www/html
sudo chown -R
whoami /var/www/html
rm index.html
ls
Upvotes: 1
Reputation: 1
just remove these two files index.html and index.nginx-debian.html from this path /var/www/html ....Good
Upvotes: 0
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
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