Home Forums WordPress Plugins Hide My WP nginx configuration resulting in 404s

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1296
    e
    Post count: 12

    We’re trying to switch over to nginx/hhvm, and were doing some testing with hidemywp (which is working fine with htaccess) before we switch.

    The follow is out site config

    server {
        listen 80;
        server_name **removed**;
        root **removed**;
    
        # FORGE SSL (DO NOT REMOVE!)
        # ssl_certificate;
        # ssl_certificate_key;
    
        index index.html index.htm index.php;
    
        charset utf-8;
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }
    
        access_log off;
        error_log  /var/log/nginx/**removed**-error.log error;
    
        error_page 404 /index.php;
        
        location /app/uploads/bp-attachments/ {
            rewrite ^.*/app/uploads/bp-attachments/([0-9]+)/(.*) /?p=$1&bp-attachment=$2 permanent;
        }
        
        rewrite /wp-admin$ $scheme://$host$uri/ last;
        rewrite ^/(wp-.*.php)$ /wp/$1 last;
        rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last;
        
        # BEGIN Hide My WP
    
        rewrite ^/kleo/(.*) /app/themes/kleo/$1 last;
        rewrite ^/template_main/(.*) /app/themes/kleo/$1 last;
        rewrite ^/template/lib/(.*) /wp-includes/$1 last;
        rewrite ^/source/(.*) /app/uploads/$1 last;
        rewrite ^/template/ext/bf0a3524/(.*) /app/plugins/admin-message/$1 last;
        rewrite ^/template/ext/c43ce400/(.*) /app/plugins/tips/$1 last;
        rewrite ^/template/ext/89fa7073/(.*) /app/plugins/advanced-email-delivery/$1 last;
        rewrite ^/template/ext/a6ae65b9/(.*) /app/plugins/anti-splog/$1 last;
        rewrite ^/template/ext/95a24316/(.*) /app/plugins/bbpress/$1 last;
        rewrite ^/template/ext/101a3e55/(.*) /app/plugins/buddypress/$1 last;
        rewrite ^/template/ext/3068417a/(.*) /app/plugins/buddypress-docs/$1 last;
        rewrite ^/template/ext/ddeaca86/(.*) /app/plugins/bp-group-calendar/$1 last;
        rewrite ^/template/ext/ff957fea/(.*) /app/plugins/contact-form-7/$1 last;
        rewrite ^/template/ext/efbc66c1/(.*) /app/plugins/css-hero/$1 last;
        rewrite ^/template/ext/4cc8b861/(.*) /app/plugins/custom-content-dashboard-widget/$1 last;
        rewrite ^/template/ext/2de002e0/(.*) /app/plugins/domain-mapping/$1 last;
        rewrite ^/template/ext/56e3ef2c/(.*) /app/plugins/force-regenerate-thumbnails/$1 last;
        rewrite ^/template/ext/cb5133fe/(.*) /app/plugins/google-analytics-async/$1 last;
        rewrite ^/template/ext/b53119a5/(.*) /app/plugins/gravityforms/$1 last;
        rewrite ^/template/ext/5a32aa23/(.*) /app/plugins/hyper-admins/$1 last;
        rewrite ^/template/ext/754601b5/(.*) /app/plugins/wpmu-dev-seo/$1 last;
        rewrite ^/template/ext/37e91fd0/(.*) /app/plugins/intercom-for-wordpress/$1 last;
        rewrite ^/template/ext/33a894eb/(.*) /app/plugins/json-rest-api/$1 last;
        rewrite ^/template/ext/a822acbf/(.*) /app/plugins/k-elements/$1 last;
        rewrite ^/template/ext/48fe98db/(.*) /app/plugins/login-mods/$1 last;
        rewrite ^/template/ext/4b1da778/(.*) /app/plugins/multi-level-push-menu/$1 last;
        rewrite ^/template/ext/3861544e/(.*) /app/plugins/multisite-theme-manager/$1 last;
        rewrite ^/template/ext/73072307/(.*) /app/plugins/blogtemplates/$1 last;
        rewrite ^/template/ext/382895f7/(.*) /app/plugins/oauth1/$1 last;
        rewrite ^/template/ext/5a70ed50/(.*) /app/plugins/password-protected/$1 last;
        rewrite ^/template/ext/439158c8/(.*) /app/plugins/proper-network-activation/$1 last;
        rewrite ^/template/ext/82a362fa/(.*) /app/plugins/pro-sites/$1 last;
        rewrite ^/template/ext/b8997fb2/(.*) /app/plugins/redux-framework/$1 last;
        rewrite ^/template/ext/95e68aeb/(.*) /app/plugins/revslider/$1 last;
        rewrite ^/template/ext/2f9059e0/(.*) /app/plugins/buddypress-media/$1 last;
        rewrite ^/template/ext/b93feccd/(.*) /app/plugins/signup-code/$1 last;
        rewrite ^/template/ext/1fa70be5/(.*) /app/plugins/signup-tos/$1 last;
        rewrite ^/template/ext/d798dbb7/(.*) /app/plugins/snapshot/$1 last;
        rewrite ^/template/ext/eb7e7335/(.*) /app/plugins/wp-stage-switcher/$1 last;
        rewrite ^/template/ext/130b3c2f/(.*) /app/plugins/taxonomy-metadata/$1 last;
        rewrite ^/template/ext/4dc289e4/(.*) /app/plugins/templatera/$1 last;
        rewrite ^/template/ext/6f034186/(.*) /app/plugins/ultimate_vc_addons/$1 last;
        rewrite ^/template/ext/478c0186/(.*) /app/plugins/ultimate-branding/$1 last;
        rewrite ^/template/ext/7e53b7c5/(.*) /app/plugins/user-management-tools/$1 last;
        rewrite ^/template/ext/7bca7b71/(.*) /app/plugins/user-role-editor-pro/$1 last;
        rewrite ^/template/ext/137bcda5/(.*) /app/plugins/user-switching/$1 last;
        rewrite ^/template/ext/94540daf/(.*) /app/plugins/vc-extensions-bundle/$1 last;
        rewrite ^/template/ext/b5348081/(.*) /app/plugins/wiki/$1 last;
        rewrite ^/template/ext/b2ecce28/(.*) /app/plugins/js_composer/$1 last;
        rewrite ^/template/ext/4c3a0433/(.*) /app/plugins/wpmudev-updates/$1 last;
        rewrite ^/template/ext/5f262c23/(.*) /app/plugins/wp-sync-db/$1 last;
        rewrite ^/template/ext/849291a1/(.*) /app/plugins/wp-sync-db-cli/$1 last;
        rewrite ^/template/ext/16f06c45/(.*) /app/plugins/wp-sync-db-media-files/$1 last;
        rewrite ^/template/ext/8b757eb8/(.*) /app/plugins/x-shortcodes/$1 last;
        rewrite ^/template/ext/(.*) /app/plugins/$1 last;
        rewrite ^/template/main\.css /?style_wrapper=1 last;
        rewrite ^/template/(.*) /app/themes/lawfm-bar/$1 last;
        rewrite ^/ajax /wp-admin/admin-ajax.php last;
        rewrite ^/(readme\.html|license\.txt|app/debug\.log|wp-includes/$) /nothing_404_404 last;
        rewrite ^/(((app|wp-includes)/([A-Za-z0-9-_/]*))|(wp-admin/(?!network/)([A-Za-z0-9-_/]+)))(\.txt|/)$ /nothing_404_404 last;
        rewrite ^/(index\.php|wp-content/repair\.php|wp-comments-post\.php|wp-includes/js/tinymce/wp-tinymce\.php|wp-cron\.php|wp-login\.php|index\.php|wp-admin/)(.*) /$1$2 last;
        rewrite ^/(.*).php$ /nothing_404_404 last;
        
        # END Hide My WP
    
        location ~* \.(ttf|otf|eot|woff|css|js|svg)$ {
            add_header Access-Control-Allow-Origin *;
        }
    
        location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
        }
    
        location ~ /\.ht {
            deny all;
        }
    }
    

    The redirected stuff is resulting in 404s, so the redirects aren’t working properly, however I believe the nginx configuration is proper. Any suggestions would be great appreciated. Thanks!

    P.S. I’m using the beta.

    #1308
    e
    Post count: 12

    Any word?

    #1311
    e
    Post count: 12

    The lack of response here is 🙁

    #1316
    e
    Post count: 12

    It’s been over a week a no response at all…

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

You must be logged in to reply to this topic.