ISPConfig 3 + Nginx + Debian 7 + Wordpress + permalinks in .htaccess

Discussion in 'Installation/Configuration' started by Airbag888, Sep 19, 2014.

  1. Airbag888

    Airbag888 New Member

    Hi all,

    After migrating a website to my DO droplet it seems that there's an issue where wordpress expects .htaccess files to exist and if not there's some sort of work around at the link below:

    Before I go ahead and reconfigure nginx (I'll have to do it for every new site/domain created in ispconfig3) I just wanted to clear out:
    1. Is there any other way to do it in ispconfig3
    2. Is this method going to create an issue/conflict with the scripts that ISPconfig uses to create and subsequently obtain site info to display in the interface.
    3. Should I just scrap it all and install Apache instead of nginx?

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats easy in ispconfig, all you have to do is:

    Login to ispconfig, go to the options tab of the website and enter the following ines in the nginx directives field of the website:

           location / {
                    try_files $uri $uri/ /index.php?$args;
           # Add trailing slash to */wp-admin requests.
           rewrite /wp-admin$ $scheme://$host$uri/ permanent;
           location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
                    expires max;
                    log_not_found off;
    and press save.
  3. Airbag888

    Airbag888 New Member

    till you're amazing. I haven't tried it yet. Will I just need this code in the option section of every website or do I also need to change the Main (generic) startup file, the Global restrictions file, WordPress Multisite Subdirectory rules, etc as per the link I posted?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    For a normal wordpress install,you have jut to put this code into the nginx directives field.

    Additional rules are only required if you need specific non standard functions like wordpress multisite. But in any case, you dont have to edit files.all the rules go straight into the nginx directives field and ispconfig will add them into the vhost file for nginx.

    Nginx is a nice fast server, but its not that easy as apache. so you will have to see if its the right one for you.
  5. Airbag888

    Airbag888 New Member

    I see. The situation is there are multiple sites, domains on 1 DO droplet. I hope i don't mess up, I'll try to find this directives field. Just need to confirm which code goes in there.

    The idea was to go with nginx as it's supposed to be much faster for our needs. I hope that past this we won't have anymore 'issues' with this choice.

    Edit: We're using the APS wordpress in ispconfig3
    Last edited: Sep 20, 2014
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not a problem as you create a new website in ispconfig for eache domain.

    I posted the rules that needs to be inserted above. Dont mess with rules from other guides for the start.

    This does not matter for the nginx rules. a aps install is just a normal wordpress install.
  7. Airbag888

    Airbag888 New Member

    SO I guess I'm not in a wordpress multisite situation then. I misunderstood

Share This Page