Search

Hi,

Bit of a strange issue that I can't figure if it's down to my nginx rules, or symphony, or PHP, or a combination.

The issue:

href's for the 'blueprints/datasources/...' and 'blueprints/events/...' for items in those areas of the Symphony administration area are missing the '/' after the 'symphony' part of the URL (installation is to the domain root, and administration mode via example.com/symphony/).

I've had a quick look through the Symphony source, and everything I found that was obviously URI-shapped, looked fine, starting with '/blurprints/...' (But I'm no Symphony core expert...).

Pages, Sections, and Utilities all seem to be working correctly. This is a clean 2.3.3 file install upgraded from a Symphony 2.2.5 DB and workspace.

Thought, tips, etc?

Thanks in advance.

This sounds like an nginx setup issue.

Rowan wrote an article here about setting it up correctly. Take a look and see how your setup matches up to his guide.

:)

I originally used that guide, but found that nginx would hit the location ~ ^(?<path>/symphony/2.1.2)/(?<admin>symphony)?(?<page>.*)$ and never hit my PHP location (and serve the contents of index.php as plain text), so I reworked it based on my install on my previous apache setup.

This is my nginx server block:

server { listen 80; server_name example.com;

### Logs
error_log /srv/www/example.com/.conf/logs/www_error.log warn;
access_log /srv/www/example.com/.conf/logs/www_access.log combined;

### Web Root
root /srv/www/example.com/symphony/public;

### Index
index index.php index.html;


location / {
    # Ignore real files...
    if (-f $request_filename) {
        break;
    }


    ### Add trailing slash
    if ($request_filename !~ "/$") {
        rewrite ^(.*)$ $1/ permanent;
    }


    ### ADMIN REWRITE - Will ignore files and directories
    rewrite ^/symphony/$ /index.php?mode=administration&$query_string last;
    if (!-e $request_filename) {
        rewrite ^/symphony/(.*)/$ /index.php?mode=administration&symphony-page=$1&$query_string last;
    }

    ### FRONTEND REWRITE - Will ignore files and directories
    if (!-e $request_filename) {
        rewrite ^/(.*)/$ /index.php?symphony-page=$1&$query_string last;
    }

}


### Block access to sensitive files...
location /manifest {
    deny all;
}
location /workspace/pages {
    deny all;
}
location /workspace/utilities {
    deny all;
}
location ~* .sql$ {
    deny all;
}


### PHP Requests...
location ~* .php {
    try_files $uri =404;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_split_path_info ^(.+.php)(.*)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass unix:/var/run/php5-fpm.example.sock;
}

}

As far as I can see, rewrites are working flawlessly. So, I'm wondering if Symphony is using a variable passed from PHP5-FPM, that somehow only affects Data Sources and Events in the Symphony administration area...

I wouldn't know personally, as I've always been an apache kind of guy.

I hope someone else can help you out here.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details