Support » Plugin: Adaptive Images for WordPress » Which “configuration file”?

  • If you are using NginX, you probably need such a bit of code in your configuration file:
    location / {
    rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;
    }

    I am using it, but what file do I need to edit?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Takis Bouyouris

    (@nevma)

    Hello, my friend,

    You need to add such a bit of code into your NginX confiduration file. There is not one single place for this. It depends on your installation, your hosting, etc.

    For instance in a standalone Linux server this might be /etc/nginx/nginx.conf, but if you are in a shared hosting or a managed WordPress hosting environment, then you should probably consult your system administrators.

    Even you can find the correct file on your own I do strongly suggest that you consult your system administrators first.

    Let me know if I can help any further!

    Cheers,
    Takis

    I have my own server with many accounts on it… Wouldn’t that change affect all WordPress sites? By the way, I use Engintron (with nginx in it).

    Plugin Author Takis Bouyouris

    (@nevma)

    Well, you should be careful to only set it up on the websites/domains that you want it to have effect on. I am not very comfortable with the intricacies of the NginX configuration, but I am certain it is doable!

    Cheers,
    Takis

    Could you give an example of a config file that I could place?
    I presume it’s like a php.ini that you place in the root of the site… I don’t know what the name of the file should be for a custom nginx config.

    Plugin Author Takis Bouyouris

    (@nevma)

    Hello,

    I will give you an example, but this is totally server dependent!

    For instance, as I mentioned before, you main NginX configuration might be in /etc/nginx/nginx.conf. There you may put all your general NginX settings.

    It is possible to put the settings of all of your websites there as different server sections. If you have many websites, it is very probable that the configuration files of these websites are included in the main NginX configuration file like this: include domains.d/*.conf;.

    So, the configuration files for the websites lie probably inside a /etc/nginx/domains.d directory. There you will find a separate configuration file for each website. Each one of these files will contain a server section and this is where you should put the code we are discussing.

    However, I must point out once again that this setup depends a lot on your server and that you do need an NginX administrator to help you with its the intricacies.

    Cheers,
    Takis

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Which “configuration file”?’ is closed to new replies.