I have droplet running Ubuntu 16.04 and LAMP stack
I have 3 sites enabled: one at /var/www/html (default apache config) two at /var/www/others/SITE/public_html
My sites are showing well, but one of then sometimes shows my site and sometimes shows apache default page
Notice, there is no default page at /var/www/html/index.html because I my first site are installed there. All said, my ‘It Works’ page is the Digital Ocean version, instead the regular apache (that is sometimes shown on my site).
You can check this behaviour at: drg.adv.br
When I open a private window the website sometimes shows the apache default page, I close the page, open private window again and my regular website.
My apache conf:
cat /etc/apache2/sites-enabled/drg.adv.br.conf
<VirtualHost *:80>
ServerName drg.adv.br
ServerAlias www.drg.adv.br
ServerAdmin webmaster@localhost
DocumentRoot /var/www/others/drg.adv.br/public_html
<Directory /var/www/others/drg.adv.br/public_html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
</VirtualHost>
Ls to site folder:
ls /var/www/others/drg.adv.br/public_html/
css font images index.htm index.html
What I’m missing?
This should be due to high acess to the site?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I’ve sent ~ 50 requests to drg.adv.br and it’s never the default page. Clear your browser cache.
Testing your site on Chrome + Safari on MacOS and Chrome, FireFox (Dev), and IE on Windows 10, I’m not able to reproduce the issue when visiting the site, whether I’m using a normal browser window or a private window.
That being said, for DirectoryIndex, unless you need to allow each type, I’d simply reduce those to what’s needed and I would start with the default for the site.
So if all your files are HTML files:
DirectoryIndex index.html
If you’re mixing HTML and PHP:
DirectoryIndex index.php index.html
etc.
For me, at least on the user end, your index.html and index.htm files are showing the same thing, so I’d simply rely on index.html unless there’s a need for the index.htm file.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.