"pretty" permalinks on Ispconfig 3-nginx engine

Discussion in 'Installation/Configuration' started by Pyxis, Nov 7, 2018.

  1. Pyxis

    Pyxis New Member

    hi all,
    I see that with nginx engine "pretty" wordpress permalinks dont' work by default..i have to add
    ---
    location / {
    try_files $uri $uri/ /index.php?$args;
    }
    ---
    in vhost site every time and restart nginx. Is there a solution for a default vhost fixed config?
     
    concept21 and Richard Foley like this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The settings depend on the cms that you install in a website, so the above settings works for WordPress but not for other cms, so it makes no sense to add that to the vhost in case that you host different cms or websites on a server. ispconfig has the directive snippet functionality for this to have such config snipptes selectable in the site settings. If you are using WordPress only, then you can add it to the nginx default vhost template of course.
     
    Richard Foley likes this.
  3. Pyxis

    Pyxis New Member

    ok so I have to add that snippet to default file (/etc/nginx/sites-enabled/default)??
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, if you want to enable it for all vhosts, then you have to copy /usr/local/ispconfig/server/conf/nginx_vhost.conf.master to /usr/local/ispconfig/server/conf-custom/nginx_vhost.conf.master and then add it in that file.
     
  5. Pyxis

    Pyxis New Member

    ok, i add
    location / {
    try_files $uri $uri/ /index.php?$args;
    }
    at the end of /usr/local/ispconfig/server/conf-custom/nginx_vhost.conf.master

    Very thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This has to be inside the vhost part and not at the end, so e.g. at line 235 would be appropriate.
     
  7. Pyxis

    Pyxis New Member

    OK thanks
     

Share This Page