<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Is it possible to give PHP apps precedence over HTML pages?]]></title><description><![CDATA[<p dir="auto">I have limited experience setting up LAMP, and what I know I learned from DigitalOcean tutorials.<br />
One of their tutorials includes this on editing the DirectoryIndex directive in mods-enabled/dir.conf:</p>
<p dir="auto">/etc/apache2/mods-enabled/dir.conf<br />
&lt;IfModule mod_dir.c&gt;<br />
DirectoryIndex index.html index.cgi <a href="http://index.pl" target="_blank" rel="noopener noreferrer nofollow ugc">index.pl</a> index.php index.xhtml index.htm<br />
&lt;/IfModule&gt;</p>
<p dir="auto">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.</p>
<p dir="auto">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?</p>
<p dir="auto">That would let me keep an index.HTML file on the site as a fallback in case PHP failed (unlikely, but surely possible).</p>
]]></description><link>https://forum.cloudron.io/topic/5381/is-it-possible-to-give-php-apps-precedence-over-html-pages</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 09:56:51 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/5381.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Jul 2021 17:44:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is it possible to give PHP apps precedence over HTML pages? on Mon, 02 Aug 2021 15:15:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Thanks!</p>
]]></description><link>https://forum.cloudron.io/post/34662</link><guid isPermaLink="true">https://forum.cloudron.io/post/34662</guid><dc:creator><![CDATA[dfoy]]></dc:creator><pubDate>Mon, 02 Aug 2021 15:15:27 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to give PHP apps precedence over HTML pages? on Tue, 20 Jul 2021 06:01:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dfoy" aria-label="Profile: dfoy">@<bdi>dfoy</bdi></a> You can add custom apache configuration in app.conf using the file manager - <a href="https://docs.cloudron.io/apps/lamp/#apache-settings" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/apps/lamp/#apache-settings</a> . I put the following line in app.conf inside the <code>VirtualHost</code> directive:</p>
<pre><code>&lt;VirtualHost *:80&gt;
   ...
    DirectoryIndex index.cgi index.pl index.php index.xhtml index.htm index.html

&lt;/VirtualHost&gt;

</code></pre>
<p dir="auto">And then restarted the app. I can confirm that php loads first before the html.</p>
]]></description><link>https://forum.cloudron.io/post/34117</link><guid isPermaLink="true">https://forum.cloudron.io/post/34117</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 20 Jul 2021 06:01:49 GMT</pubDate></item><item><title><![CDATA[Reply to Is it possible to give PHP apps precedence over HTML pages? on Tue, 20 Jul 2021 00:06:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dfoy" aria-label="Profile: dfoy">@<bdi>dfoy</bdi></a> Is this with the LAMP app on Cloudron (or some other app) ?</p>
]]></description><link>https://forum.cloudron.io/post/34108</link><guid isPermaLink="true">https://forum.cloudron.io/post/34108</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 20 Jul 2021 00:06:57 GMT</pubDate></item></channel></rss>