Feedback PluXML + URL rewriting

Hi,

Thank you Yunohost Team and @matlink for PluXml integration!

After installing pluxml as a new custom application (https://github.com/matlink/pluxml_ynh) on yunohost, I saw that it was a PluXml v5.3.1. So I’d just upgraded PluXml to 5.4 as described in PluXml documentation. Then, I’d setup my domain name to use dyndns services from dnsexit.com with there own dynamic IP update clients (ipUpdate-1.6-3.deb) and gess what, all is runnig fine!

Then I’d setup URL rewriting for SEO pupose :

  • In pluxml Administration -> Parameters -> Advanced configuration -> Enable url rewriting : Yes.

  • Install and set MyBetterUrls - Version 1.4.2 : http://pluxopolis.net

  • Customize /etc/nginx/conf.d/domain.tld.d/pluxml.conf with several things found on blogs and forums :

      location /pluxml {
          # Path to source
          alias /var/www/pluxml ;
          # Example PHP configuration
          index index.php;
          try_files $uri $uri/ index.php;
          location ~ [^/]\.php(/|$) {
                  fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                  fastcgi_pass unix:/var/run/php5-fpm.sock;
                  fastcgi_index index.php;
                  include fastcgi_params;
                  fastcgi_param REMOTE_USER $remote_user;
                  fastcgi_param PATH_INFO $fastcgi_path_info;
                  fastcgi_param SCRIPT_FILENAME $request_filename;
          }
          # Avoid .htaccess
          location ~ /\.ht {
                  deny all;
          }
          # Security setting ?
          location /pluxml/version {
                  return 403;
          }
          location /pluxml/data/configuration/users.xml {
                  return 403;
          }
          location /pluxml/data/medias {
                  allow all;
                  break;
          }
          #location /pluxml/data {
          #       deny all;
          #       return 403;
          #}
          # Paranoïd setting ?
          if (-f $request_filename) {
                  break;
          }
          # URL rewriting
          if (!-e $request_filename) {
                  rewrite ^/pluxml/([^feed\/].*)$ /pluxml/index.php?$1 last;
                  rewrite ^/pluxml/feed\/(.*)$ /pluxml/feed.php?$1 last;
                  break;
          }
          # Include SSOWAT user panel.
          include conf.d/yunohost_panel.conf.inc;
      }
    

After changing pluxml.conf think about reloading nginx : service nginx reload

The only thing I found not working at the moment : the plugin ckeditor do not show files in /var/www/pluxml/data/medias. Files and directories rights and group seem ok, several tries with rules in /etc/nginx/conf.d/domain.tld.d/pluxml.conf don’t change anything. Still searching…

I regret - I did not found how to install more than one pluxml instance. Peut-être dans une prochaine intégration ? :wink:

Cheers and good luck!

Hi and thanks a lot for this guide!
I think it should be quite straightforward to tweak the app into a multi-instance one. I’ll have a look some day.

Cheers

Edit: it’s as easy as changing a single line of code :smile: I sent a pull request

Thanks to you scith I sign up for github to be notified about pluxml_ynh :slight_smile:

:wink:
Can you test the new version of pluxml by matlink please? He updated the sources to 5.4 and added multi-instances.
We think multi-instances work now but if you could test it as well it would be nice :smile:

Cheers

Hi scith, what a fast RERO :smiley: I love it!
Yes I saw the post on https://github.com/matlink/pluxml_ynh, cool!
I plan to test it very soon, first on my first yunohost installed, then on a fres ynh install.
I tell you asap
Cheers

Hi,

I’ve tested with 3 real domain names, install, uninstall, delete directories and conf files, and reinstall for 3 pluxml multi-instance : and it works! :smile:

I made these tests with my first pluxml mono-instance previously insalled - it stayed up and served by nginx like a charm :sunglasses:

Only one crunch : one of the 3 domain name is no more “recognized” by ynh. PluXml multi is correctly installed but https://domaine.tld/pluxml switches to https://domaine.tld/yunohost/admin/#/login and say : L’API ne répond pas (erreur : 0 error). No nginx restart nor reboot help. I guess I made some “too strong deletes” somewhere in ngnix conf files and/or yunohost has lost its mind with my tests de ouf…

May be one remark about /etc/nginx/conf.d/domaine.tld.d/pluxml**__x**.conf : I wonder if rewrite rules for location should be /pluxml**__x**/data/… rather /pluxml/data/… since files are in /var/www/pluxml**__x**/data/… ?

One more time, thanks all of you!

Cool :smile:
For your last question I don’t think so because there is already the alias set up. /pluxml is your path

On your broken domain, yes perhaps try reverting any changes in domain.conf and check that there is no strange conf in the directory (sometimes I have old conf files which weren’t deleted although I deleted the related apps)

Do you have any issue accessing medias, images?

Yes I have. But less than with the previous package version.
Now I can access to the medias directory in the backend, but as before not with ckeditor.
Previous versions didn’t show thumbnails, and no way to show the image following the link.