• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue I migrated a domain and .htaccess isn't working

SacAutos

Regular Pleskian
I just completed a migration of a bunch of subscriptions from one server to another running CentOS 8. All of them used .htaccess files. They all are working on the new platform except one. Somehow it stubbornly won't accept under Hosting Settings PHP 7.2 with FastCGI under Apache. I change it and it keeps reverting to FPM under Apache.

I've tried "plesk repair web <domain>" but there's no difference. Any ideas what I can look at to break this deadlock?
 
Could you please clarify the question(s)?

In your headline it says .htaccess isn't working: What exactly is not working? Do you see an "internal server error" message? Is .htaccess present, not causing any errors, but not doing what it is supposed to do?

In the body you are saying that you try to set PHP 7.2 FPM under Apache, but it keeps reverting to PHP 7.2. FastCGI under Apache. That does not seem to be linked to the other issue, and it is a very strange behavior. Are you sure you have read this correctly and it does not say "Nginx"? Could it be possible that you have selected Nginx-only hosting in the Apache & Nginx settings? In that case you can only use PHP with Nginx. That would also explain why .htaccess is not used.
 
We can withdraw this one. I just built a new subscription with a similar but different name. Copied all the content over. Then renamed the original to something different and the new one to the proper name. Now it works. Thanks for listening.
 
i try to configure .html file run as php , but strange thing happen..

I try to add custom values in PLESK "Additional directives for HTTP /HTTPS like:
php_value auto_prepend_file "/var/www/vhosts/mysite.com/httpdocs/open_apache.php"
AddHandler php5-script .php .html .htm
AddType text/html .php .html .htm


THIS dont't work!

in .htaccess its work

php_value auto_prepend_file "/var/www/vhosts/mysite.com/httpdocs/open_htaccess.php"

<FilesMatch "\.html$">
SetHandler php-script
</FilesMatch>


but .php files shown PHP Version 7.4.13 as configured in PLESK ( FRM served by Apache) and .html show PHP Version 5.4.16 !
How can i resolve this problem and configure .html files with correct php version ?
 
i try to configure .html file run as php , but strange thing happen..

I try to add custom values in PLESK "Additional directives for HTTP /HTTPS like:
php_value auto_prepend_file "/var/www/vhosts/mysite.com/httpdocs/open_apache.php"
AddHandler php5-script .php .html .htm
AddType text/html .php .html .htm


THIS dont't work!

in .htaccess its work

php_value auto_prepend_file "/var/www/vhosts/mysite.com/httpdocs/open_htaccess.php"

<FilesMatch "\.html$">
SetHandler php-script
</FilesMatch>


but .php files shown PHP Version 7.4.13 as configured in PLESK ( FRM served by Apache) and .html show PHP Version 5.4.16 !
How can i resolve this problem and configure .html files with correct php version ?
Product version: Plesk Obsidian 18.0.32.2
OS version: CentOS 7.9.2009 x86_64
Build date: 2020/12/21 13:00
also if i try to use composer to install some libs, i get allert about old unsoported version php 5.4.16
 
1) In .htaccess only add this:
AddHandler php-script .html .htm .inc

2) If you are using PHP-FPM: In the PHP icon add this to the additional PHP settings:
[php-fpm-pool-settings]
security.limit_extensions = .php .phar .html .htm .inc

3) If you are using PHP-FPM: in the Additional Apache settings add this:
<IfModule mod_proxy_fcgi.c>
<Files ~ .(?i:inc|html|htm)$>
SetHandler proxy:unix:///var/www/vhosts/system/example.com/php-fpm.sock|fcgi://127.0.0.1:9000
</Files>
</IfModule>
(Replace "example.com" with your domain name.)

4) Restart the web server
 
Back
Top