nginx config – WP Plugins Tips

How to setup Hide My WP on Nginx server

If your server is a Linux server, the main path to the nginx.conf file is /etc/nginx/nginx.conf (or /etc/nginx/conf/nginx.conf if you’re using Arch Linux). If the server is a Windows server your nginx.conf file will be located at C:\nginx\conf\nginx.conf)

If your nginx doesn’t have sites-enabled option activated (check for sites-enabled subdirectory in the same directory with nginx.conf file), you will find the server configuration in nginx.conf file like in the below example:

server {
        server_name [your domain name];
        root [path to the website root];
        index index.php;

        location / {
                try_files $uri $uri/ /index.php?$args;
        }

}

Now, if you change the settings in Hide My WordPress to ninja mode, you will be asked to add the code in nginx.conf file.

 

Continue reading