0

I run into problems with my wordpress installation.

I try to redirect some older pages with .html ending to the root, but my nginx keeps to show up an 404 error. I guess I need to configure something inside nginx, but I don't know what.

Down here you can see my nginx configs:

##GridPane_Prometheus_vHost_Begin##
#HTTPS#
include /var/www/caspar-labs.com/nginx/*-http-context.conf;
server {
    listen 80;
    listen [::]:80;

    server_name caspar-labs.com www.caspar-labs.com;

    #include /var/www/caspar-labs.com/nginx/caspar-labs.com-headers-csp.conf;
    include /etc/nginx/common/headers-http.conf;
    include /var/www/caspar-labs.com/nginx/*-return-https-context.conf;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name caspar-labs.com www.caspar-labs.com;

    ssl_certificate /etc/letsencrypt/live/caspar-labs.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/caspar-labs.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/caspar-labs.com/chain.pem;

    access_log /var/log/nginx/caspar-labs.com.access.log we_log;
    error_log /var/log/nginx/caspar-labs.com.error.log;

    root /var/www/caspar-labs.com/htdocs;

    include /etc/nginx/common/caspar-labs.com-sitemap.conf;
    include /var/www/caspar-labs.com/nginx/*-realip-context.conf;
    include /etc/nginx/common/gridpane-realip.conf;
    #include /etc/nginx/common/6g.conf;
    include /etc/nginx/common/caspar-labs.com-compression.conf;
    include /etc/nginx/common/caspar-labs.com-static.conf;
    include /etc/nginx/common/caspar-labs.com-wp-redis.conf;
    #include /etc/nginx/common/acl.conf;
    include /etc/nginx/common/caspar-labs.com-wpcommon.conf;
    #include /etc/nginx/common/wpsubdir.conf;
    include /etc/nginx/common/security.conf;
    #include /var/www/caspar-labs.com/nginx/caspar-labs.com-headers-csp.conf;
    include /etc/nginx/common/headers-http.conf;
    include /etc/nginx/common/headers-https.conf;
    include /etc/nginx/common/headers-html.conf;
    include /var/www/caspar-labs.com/nginx/*-main-context.conf;
    include /etc/nginx/extra.d/main-context.conf;

rewrite ^/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
rewrite ^/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
rewrite ^/sitemaps/([_0-9a-zA-Z-]+)?\.xml$ /index.php?seopress_cpt=$1 last;
}
##GridPane_Prometheus_vHost_End##

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.