Recent Posts

Pages: [1] 2 3 ... 10
General / Re: Update Log
« Last post by earnolmartin on September 22, 2018, 05:05:29 pm »
Minor update released.
Technical Help / Re: PHP in html file config please
« Last post by earnolmartin on September 10, 2018, 04:23:59 pm »
Awesome, glad it worked.  Let me know if you run into any issues as a result of updating to the latest dev version.  These features will be released to the stable build soon.

You can always change the order of which page should load by default when a specific page hasn't been requested (usually the index file).  That also appears in the subdomain or domain templates.  You can re-order which index page loads by default and has a higher priority than the others (index.html vs index.php).  Just search for index.html in the custom template, and you should see the lines I'm talking about.

Thanks for testing it out.
Technical Help / Re: PHP in html file config please
« Last post by whiterabbitz on September 10, 2018, 03:17:05 pm »
You are a star!

Works .. with a small caveat.

Being a long term cynic.. been in IT too long.

1) Remove the pseudo  subdomain

2) Ran update

3) Added new subdomain devel.mydomain,com

4) Tested devel.mydomain,com - Ok

5) Modified index.php in to make sure i was looking at the right file - all good

6) Made the modes - template and /etc/php/7.0/fpm/pool.d/www.conf

7) Re-tested - file not found

8) Re Re tested devel.mydomain,com/index.php - ok

9) added index.html in

10) and tested  - ok showed content of index.html

11) Added <?php phpinfo(); ?>  to index.html - Worked like a charm!!

So Only issue - which I can live with, is that the .html is the default extension and .php must be specified.

Not a problem for this site

Thanks again

Technical Help / Re: PHP in html file config please
« Last post by earnolmartin on September 10, 2018, 12:58:53 pm »
Actually, could you please try updating your panel to the latest dev SVN version (instructions here and use the new custom subdomain web server template functionality?

After you've updated your panel, logout and login as admin, then select the domain you want to add a subdomain to (in your case ""), click on "Add Subdomain".  Add the "devel" subdomain.  Go back to the main domain management screen for "".  Click on "List Subdomains".  Click on the "Edit Template" icon for the "devel" subdomain. 

Replace the ProxyPassMatch lines with the following:

Code: [Select]
ProxyPassMatch ^(.*\.(php|html))$ fcgi://{homedir}/$1

Click on the "Save Template" button.

Now, make sure you follow the instructions I posted above to get php-fpm to process .html files.  It should work this way now too, and we now have custom subdomain template functionality (assuming I coded the functionality correctly, which from my initial testing, I hopefully did).
Technical Help / Re: PHP in html file config please
« Last post by whiterabbitz on September 10, 2018, 12:17:28 am »

Thanks so much for that.

I will give it a try tomorrow and let you know the results.

Technical Help / Re: PHP in html file config please
« Last post by earnolmartin on September 09, 2018, 11:35:13 pm »
Should be doable.  However, EHCP Force Edition doesn't yet support individual custom subdomain apache or nginx templates (other than the global subdomain template which can be changed here index.php?op=manageglobalwebtemplates)

Thus, for your scenario, I recommend adding the subdomain as a new domain under your account.  You would configure both "" and "" as separate domains (do NOT create "" as a subdomain in the panel under the "" domain).  Using this configuration, "" is still technically a subdomain, but it is setup in the panel as a domain.  This will allow you to edit the custom apache2 template just for "".  Log in as the admin user for the EHCP panel.  Select the domain you want to use a custom apache2 template for (in your case ""), and then click on the "Edit apache2 Template" link.  Find this line (might be two or more instances if you're using SSL):

Code: [Select]
ProxyPassMatch ^(.*\.php)$ fcgi://{homedir}/httpdocs/$1

Change it to:

Code: [Select]
ProxyPassMatch ^(.*\.(php|html))$ fcgi://{homedir}/httpdocs/$1

Then, we need to allow php-fpm to process .html extensions (  So in the "/etc/php/7.0/fpm/pool.d/www.conf" file (differs depending on which version of Ubuntu you're on... could be in /etc/php5/fpm/pool.d/www.conf or /etc/php/7.x/fpm/pool.d/www.conf), add this line to the bottom:

Code: [Select]
security.limit_extensions = .php .html

Restart the php-fpm service (command differs depending on Ubuntu version):

Code: [Select]
sudo service php7.0-fpm restart

That should be it.  You never want to edit the EHCP template conf files directly (found in /var/www/new/ehcp), as any changes you make will be overwritten when the panel next syncs.  You want to use the custom template functionality in the panel to make sure your changes persist.  I hope this helps.  Please let me know.   ;D
Technical Help / PHP in html file config please
« Last post by whiterabbitz on September 09, 2018, 02:28:51 am »
Hi All.

Firstly great product - loaded 2 days ago without a hitch. From zero to ssl in 20 mins!

I am trying to have apache2 interpret .html with php embedded.

Why you may well ask.

Migrating a site for a friend from content manager adobe catalyst - expensive and slow.

The site is heavily indexed by google... so want to maintain the .html extensions. And broke it up ... header. footer and content using php includes so it was maintainable.


ubantu 16.04

Primary domain mydomain,com

Only want php in html on

Both running ssl

Usually I would put in .htaccess this:

AddType text/html .shtml .shtm .htm .html
AddHandler server-parsed .shtml .shtm .htm .html
Options Indexes FollowSymLinks Includes
AddHandler application/x-httpd-php .html

and away it goes.. but can't get it running with ehcp forced addition -

the page loads ok but the php is just text in the rendered output.

Have also tinkered with  /var/www/new/ehcp/apachehcp_subdomains.conf
 but no go ..

Any assistance would be appreciated.


General / Re: Update Log
« Last post by earnolmartin on August 08, 2018, 11:41:03 am »
Minor update released.
Ubuntu / Re: Compatibility with PHP 7 and PHP 5 and possible work arounds.
« Last post by earnolmartin on August 08, 2018, 11:33:45 am »
Yeah, well there's no magic wand to convert old PHP scripts to be compatible with PHP7.  However, you can manually convert them which is what I do with EHCP software.  Usually, I just change software so that it is compatible with both versions to avoid any problems. 

It does suck, but the blame goes to PHP (for their stupid ways of deprecating code and not converting these deprecated functions over to the new format), and that's all you can do.

You should run one server with several virtual machines.  Then, it's no problem to run many servers on one server.
Technical Help / Re: Remote Backup Question
« Last post by earnolmartin on August 08, 2018, 11:30:20 am »
It looks like your FTP server doesn't like the filename for some reason.  Looks like you'll need to be tweaking its options, but I am not familiar with Qnap, so I can't help you there.
Pages: [1] 2 3 ... 10