Home Forums WordPress Plugins Hide My WP Need help configuring Nginx because ATM it broke my CSS

This topic is: not resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #25911
    Space Monkey
    Post count: 2

    I probably did it wrong somewhere but the plugin strips all CSS when activated.

    I run Nginx in plesk and I already added several things without issues.

    In plesk you add things in the additional nginx directives field.

    For testing I left everything in HMW on default and this is the code I added:

    rewrite ^/other/js/embed\.min\.js /wp-includes/js/wp-embed.min.js?XtZ_hide_my_wp=1234 last;
    rewrite ^/other/(.*) /wp-includes/$1?XtZ_hide_my_wp=1234 last;
    rewrite ^/file/(.*) /wp-content/uploads/$1?XtZ_hide_my_wp=1234 last;
    rewrite ^/ext/(.*) /wp-content/plugins/$1?XtZ_hide_my_wp=1234 last;
    rewrite ^/skin/main\.css /?style_wrapper=1&XtZ_hide_my_wp=1234 last;
    rewrite ^/skin/style\.css /nothing_404_404?XtZ_hide_my_wp=1234 last;
    rewrite ^/skin/(.*) /wp-content/themes/Newspaper/$1?XtZ_hide_my_wp=1234 last;
    rewrite ^/ajax /wp-admin/admin-ajax.php?XtZ_hide_my_wp=1234 last;
    rewrite ^/inc/(.*) /wp-content/$1?XtZ_hide_my_wp=1234 last;
    rewrite ^/(readme\.html|license\.txt|wp-content/debug\.log|wp-includes/$) /nothing_404_404?XtZ_hide_my_wp=1234 last;
    rewrite ^/(((wp-content|wp-includes)/([A-Za-z0-9\-\_\/]*))|(wp-admin/(!network\/?)([A-Za-z0-9\-\_\/]+)))(\.txt|/)$ /nothing_404_404?XtZ_hide_my_wp=1234 last;

    Restarted the server, cleared cache but it breaks my site.

    #25922
    Suman M.
    Post count: 12480

    Hi, can you please generate debug report report from HMWP start tab and post it here as private reply.

    If you have added HMWP rules and restarted Nginx server, but the site breaks then it’s most probably that HMWP rewrite rules are not being correctly added in Nginx config. Can you please contact your hosting provider regarding where exactly HMWP rules are being added?

    #25932
    Space Monkey
    Post count: 2

    I am on a selfhosted cloud at Vultr so I have full control. However, I haven’t restarted the server so will try that first.

    #25938
    Suman M.
    Post count: 12480

    Okay, please restart the server and let us know. Also it would be nice if you could post here your site’s Nginx config content (after HMWP rules are being added to it).

    #25962
    Space Monkey
    Post count: 2
    This reply has been marked as private.
    #25964
    Suman M.
    Post count: 12480

    Do you have access to Nginx config file? If so, can you please post it’s content here?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.