0

I recently made a DigitalOcean droplet with LAMP pre-installed. Went and uploaded my website (including index.php) to /var/www

Apache just returns the It Works! page, I have to manually add /index.php to my url

Things I have tried:

  1. Made an .htaccess file containing "DirectoryIndex index.php"
  2. Adding DirectoryIndex index.php to apache2.conf
  3. Set index.php first in dir.conf
  4. Making an index.html, didn't show that either.

EDIT: here's my apache2.conf file: http://pastebin.com/BMgiNdiD

2
  • whats in your apache2.conf? what directory has been set? Also you have set index.PHP to the directory index so a .html page will not override the php index page Commented Jan 27, 2014 at 18:45
  • Possible duplicate of index.php not loading by default Commented Sep 12, 2019 at 18:10

1 Answer 1

1

You are missing following configuration:

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
               default.php default.pl default.cgi default.asp default.shtml default.html \
               default.htm home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.