• 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!
  • 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.

Plesk 11.5 + nginx = no .htaccess ?

David Aguilar

Basic Pleskian
Hi,

I have plesk 11.5 , configured nginx to serve php files.

If I enable this option, a magento site can't process some rewrite rules. I suspect that this is because nginx can't read .htaccess files ?

If I turn off php process by php all is working right ( even with nginx's intelligent process + static files served by nginx )
 
Yes, nginx+php-fpm does not process .htaccess files. So you need to setup custom nginx directives for your apps.
 
Yup. nginx does not support .htaccess files for performance reasons.

Therefore some applications may not function properly in php-fpm mode. You may use a custom per-vhost nginx configuration (vhost_nginx.conf) as a workaround.
 
Doesn't plesk like generate this new vhosts file every day? I didn't still try this with plesk but on other system without plesk where i run nginx i know when i setup once rewrites and everything in vhost I don't touch this. Not sure how this work with plesk, but yeah...if file get reseted to default outcome is obvious, no rewrites = application/website is not working. Any KB regarding this, I'm curious how Plesk handle this :)
 
Nothing is regenerated "every day" without a reason to.

/var/www/vhosts/domain.tld/conf/vhost_nginx.conf is a custom file that you may create and then call
# plesk sbin httpdmng --reconfigure-all
and it will be included in Plesk 11.5 configuration for nginx. It will not be overwritten by Plesk (just like vhost.conf and vhost_ssl.conf for Apache).
 
Awesome, I knew they probably take care of that (i'm on 11.0.9 so I didn't knew). This one is very nice.

Thanks Nikolay.
 
Hi,

I think there's somehow a workaround, as nginx can "redirect" some files to apache, so you can combine apache to read .htaccess ( so make redirs of magento ) and nginx passing simply php code.

My problem now is that I turn on PHP-FPM but it's still processing as PHP-FastCGI
 
Yes, nginx+php-fpm does not process .htaccess files. So you need to setup custom nginx directives for your apps.


this is not true, I have a website where htaccess works and plesk is configured to use php-fpm, 3 items are all checked in the web server configuration settings.

Why continue to run apache2 and htaccess?
 
Back
Top