Home › Forums › WordPress Plugins › Hide My WP › Need help configuring Nginx because ATM it broke my CSS
- This topic has 5 replies, 2 voices, and was last updated 6 years, 8 months ago by
Suman M..
-
AuthorPosts
-
March 23, 2019 at 1:16 am #25911
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.
March 24, 2019 at 10:48 am #25922Hi, 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?
March 24, 2019 at 4:54 pm #25932I am on a selfhosted cloud at Vultr so I have full control. However, I haven’t restarted the server so will try that first.
March 25, 2019 at 4:43 am #25938Okay, 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).
March 26, 2019 at 7:01 pm #25962This reply has been marked as private.March 26, 2019 at 7:52 pm #25964Do you have access to Nginx config file? If so, can you please post it’s content here?
-
AuthorPosts
You must be logged in to reply to this topic.

