Store Community Support Documentation

HI, I thought this might come in handy for anyone looking to use Short URL's with Nginx on PLesk Control Panel

( this is only for someone wanting to run FPM application served by Nginx )

my setup is CentOS 7 with PLesk Obsidian Control Panel

in PLesk there is setting to add additional nginx directives, it's located under > Apache & Nginx Settings.

Additional nginx directives

Here you can specify the settings for the nginx reverse proxy server that runs in front of Apache. Your directives will override the server-wide nginx configuration. For example, you may want to change the connection timeout or to pack requests with gzip. Use the same syntax as you use for nginx.conf. For example, if you want to pack all the proxied requests with gzip, add the line: 'gzip_proxied any;'.

Additional nginx directives

I added this rewrite code below and now its working ( I have Snapshots of the settings below also, and where you add the rewrite code for short url's to work with Nginx for phpFox in PLesk control Panel . It's working great with phpFox version 4.7.8 and should be backward compatible to work with version 4.6.0 and up

if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
location / {
rewrite ^/file/(.*) /PF.Base/file/$1 last;
rewrite ^/static/ajax.php /index.php last;
rewrite ^/themes/default/(.*) /PF.Base/theme/default/$1 last;
rewrite ^/(static|theme|module)/(.*) /PF.Base/$1/$2 last;
rewrite ^/(Apps|themes)/(.*) /PF.Site/$1/$2 last;
try_files $uri $uri/ /index.php?$query_string;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
location /PF.Base/file/log {
deny all;
return 404;


Here are my photos so you can see how the settings look in PLesk - last photo is where I've added the rewrite code and got short URL's working on mysite :)















The last Photo is where I added the rewrite code for phpFox to work with Nginx in Plesk

Click Apply and your all Done. 

then go back to AdminCP and click on Short URL's. 

if it says can't read .htaccess file, you need to manually turn on this feature 

FTP to your public_html folder and open the file 

PF.Base / file / settings / server.sett.php

and look for 
$_CONF['core.url_rewrite'] = '2'; 

and replace that with 
$_CONF['core.url_rewrite'] = '1';

By setting this to "1" this will transform your sites URLs from (example's below):

Save and close the file.

You should now have short url's enabled on your site. 

Hope this Helps someone who may require to run phpFox Short URLS with Nginx on Plesk Control Panel


Warm Regards,


Spiro G

Last update on October 29, 6:09 am by spirog.

Thanks for the info...I am confused though.  Are you saying it was not working at all with the .htaccess before you did this?  Under your PHP settings are you running PHP as FPM application served by Apache or FPM application served by Nginx or Fast CGI application served by Apache?

If your setting is PHP as FPM application served by Apache then I am confused why my short URL already works for this using htaccess file.

You seem to know way more than I on server stuff so what is the advantage of what your doing besides get short URLs to work.  It looks like I have the same setup as you as I just upgrade to Plesk Obsidian Control Panel as well.


Hi @JohnJr , I will update my post: I am running FPM application served by Nginx

so this is only for someone wanting to run FPM application served by Nginx

Notice Proxy Mode has no check mark I turned apache off to run FPM application served by Nginx

Sorry for the confusion :grin:



Last update on October 29, 6:12 am by spirog.