{"id":16187699,"date":"2024-09-17T10:45:31","date_gmt":"2024-09-17T10:45:31","guid":{"rendered":"https:\/\/wpml.org\/?post_type=faq&#038;p=16187699"},"modified":"2024-09-17T11:22:40","modified_gmt":"2024-09-17T11:22:40","slug":"nginx-server-settings","status":"publish","type":"faq","link":"https:\/\/wpml.org\/th\/faq\/nginx-server-settings\/","title":{"rendered":"How can I adjust server settings for my NGINX website?"},"content":{"rendered":"\n<p class=\"lead\">Learn how to fix the 404 error when viewing your WordPress login page in a secondary language.&nbsp;<\/p>\n\n\n\n<p>If your site uses NGINX and your <a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/language-setup\/language-url-options\/\">language URL format<\/a> is set to <strong>Different languages in directories<\/strong>, you may see a 404 error when trying to access a login or registration page in a secondary language.&nbsp;<\/p>\n\n\n\n<p>To avoid this error, you need to adjust your NGINX settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How can I adjust NGINX settings?<\/h2>\n\n\n\n<p>Because NGINX can\u2019t access your <strong>htaccess<\/strong> file, you need to add the following <a href=\"https:\/\/blog.nginx.org\/blog\/creating-nginx-rewrite-rules\/\" target=\"_blank\" rel=\"noreferrer noopener\">rewrite rules<\/a> to your NGINX settings:&nbsp;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nrewrite ^\/xx\/wp-login.php \/wp-login.php break;\n<\/pre><\/div>\n\n\n<p>For example, if English, German, and French are active on your site, the NGINX rules would be:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nrewrite ^\/en\/wp-login.php \/wp-login.php break;\nrewrite ^\/de\/wp-login.php \/wp-login.php break;\nrewrite ^\/fr\/wp-login.php \/wp-login.php break;\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>You can adjust your server settings by adding rewrite rules in your NGINX settings.  <\/p>\n","protected":false},"author":578773,"featured_media":0,"menu_order":0,"template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ep_exclude_from_search":false,"footnotes":""},"faq-category":[26129],"class_list":["post-16187699","faq","type-faq","status-publish","hentry","faq-category-error-messages"],"_links":{"self":[{"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/faq\/16187699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/users\/578773"}],"version-history":[{"count":8,"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/faq\/16187699\/revisions"}],"predecessor-version":[{"id":16187870,"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/faq\/16187699\/revisions\/16187870"}],"wp:attachment":[{"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/media?parent=16187699"}],"wp:term":[{"taxonomy":"faq-category","embeddable":true,"href":"https:\/\/wpml.org\/th\/wp-json\/wp\/v2\/faq-category?post=16187699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}