-
I have limited experience setting up LAMP, and what I know I learned from DigitalOcean tutorials.
One of their tutorials includes this on editing the DirectoryIndex directive in mods-enabled/dir.conf:/etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>By moving "index.php" to the first position in the DirectoryIndex directive, I can cause index.PHP to run as the default rather than index.HTML.
I realize I can just remove index.HTML if I want index.PHP to be the file that runs, but I wonder, is it possible for me to edit a DirectoryIndex directive somewhere, as per the tutorial?
That would let me keep an index.HTML file on the site as a fallback in case PHP failed (unlikely, but surely possible).
-
I have limited experience setting up LAMP, and what I know I learned from DigitalOcean tutorials.
One of their tutorials includes this on editing the DirectoryIndex directive in mods-enabled/dir.conf:/etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>By moving "index.php" to the first position in the DirectoryIndex directive, I can cause index.PHP to run as the default rather than index.HTML.
I realize I can just remove index.HTML if I want index.PHP to be the file that runs, but I wonder, is it possible for me to edit a DirectoryIndex directive somewhere, as per the tutorial?
That would let me keep an index.HTML file on the site as a fallback in case PHP failed (unlikely, but surely possible).
-
I have limited experience setting up LAMP, and what I know I learned from DigitalOcean tutorials.
One of their tutorials includes this on editing the DirectoryIndex directive in mods-enabled/dir.conf:/etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>By moving "index.php" to the first position in the DirectoryIndex directive, I can cause index.PHP to run as the default rather than index.HTML.
I realize I can just remove index.HTML if I want index.PHP to be the file that runs, but I wonder, is it possible for me to edit a DirectoryIndex directive somewhere, as per the tutorial?
That would let me keep an index.HTML file on the site as a fallback in case PHP failed (unlikely, but surely possible).
@dfoy You can add custom apache configuration in app.conf using the file manager - https://docs.cloudron.io/apps/lamp/#apache-settings . I put the following line in app.conf inside the
VirtualHostdirective:<VirtualHost *:80> ... DirectoryIndex index.cgi index.pl index.php index.xhtml index.htm index.html </VirtualHost>And then restarted the app. I can confirm that php loads first before the html.
-
@dfoy You can add custom apache configuration in app.conf using the file manager - https://docs.cloudron.io/apps/lamp/#apache-settings . I put the following line in app.conf inside the
VirtualHostdirective:<VirtualHost *:80> ... DirectoryIndex index.cgi index.pl index.php index.xhtml index.htm index.html </VirtualHost>And then restarted the app. I can confirm that php loads first before the html.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login