{"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\/vi\/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,"_uag_custom_page_level_css":"","ep_exclude_from_search":false,"footnotes":""},"faq-category":[26129],"class_list":["post-16187699","faq","type-faq","status-publish","hentry","faq-category-error-messages"],"spectra_custom_meta":{"_subscription_coupon_product_id":["0"],"_wpv_contains_gutenberg_views":[""],"_edit_lock":["1726572164:578773"],"_wpml_word_count":["159"],"_alp_processed":["1726572161"],"_edit_last":["578773"],"cmplz_hide_cookiebanner":[""],"_wpml_media_duplicate":["1"],"_wpml_media_featured":["1"],"_yoast_wpseo_primary_faq-category":["26129"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_wpml_location_migration_done":["1"],"_yoast_wpseo_metadesc":["Learn how to fix the 404 error when viewing your WordPress login page in a secondary language.\u00a0"],"_views_template":["0"],"_wp_old_slug":["how-to-adjust-server-settings-for-sites-that-use-nginx"],"__wpcf-invalid-fields":["1"],"_oembed_8631ce55de250fba0cc0768ef0e446d5":["{{unknown}}"],"_oembed_f90d7acce1be2efb8a597da9feb623da":["{{unknown}}"],"_oembed_4df63268970b52a287fd50ba6fc399cb":["{{unknown}}"],"_oembed_8b192c37df925cacb831b3922e69595d":["<iframe title=\"Using WPML To Translate Pages Built With Fusion Builder (Avada Theme)\" width=\"700\" height=\"394\" src=\"https:\/\/www.youtube.com\/embed\/_bNqjjBPdGA?feature=oembed&enablejsapi=1&origin=https:\/\/wpml.org\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>"],"_oembed_time_8b192c37df925cacb831b3922e69595d":["1730864768"],"_uag_css_file_name":["uag-css-16187699.css"]},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"gform-image-choice-sm":false,"gform-image-choice-md":false,"gform-image-choice-lg":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false},"uagb_author_info":{"display_name":"Tomer Helzer","author_link":"https:\/\/wpml.org\/vi\/author\/tomer-h\/"},"uagb_comment_info":0,"uagb_excerpt":"You can adjust your server settings by adding rewrite rules in your NGINX settings.","_links":{"self":[{"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/faq\/16187699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/users\/578773"}],"version-history":[{"count":8,"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/faq\/16187699\/revisions"}],"predecessor-version":[{"id":16187870,"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/faq\/16187699\/revisions\/16187870"}],"wp:attachment":[{"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/media?parent=16187699"}],"wp:term":[{"taxonomy":"faq-category","embeddable":true,"href":"https:\/\/wpml.org\/vi\/wp-json\/wp\/v2\/faq-category?post=16187699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}