Lengkap

Setup NGINX server config, allowing WordPress to handle static URL requests

Hello, I am working on a WordPress project project with an NGINX server, hosted by WPEngine.com. I've setup a clean test environment with no extra plugins.

[login to view URL]

My goal:

Is to re-map my uploaded media file (jpg, mv4) URLs the same way WordPress uses permalinks for WordPress page URLs. For example, without actually moving the file, I want this uploaded jpg with actual URL:

[login to view URL]

to also be called with this "pretty" URL request using the /media/ permalink directory:

[login to view URL]

Issue:

While I'm trying to use the code snippet, linked just below, the NGINX server is intercepting before the URL request is even getting to Wordpress. Instead, I get a NGINX 404 error message page.

What I have tried:

Since static URL files were not reaching WordPress, I asked my hosting provider to add this rule into my NGINX config file:

error_page 404 /[login to view URL];

That didn't seem to work so I asked them to try:

error_page 404 =200 /[login to view URL];

This code is currently in place, if you are looking at the examples above. This seems to direct static URL requests to WordPress's 404 page but the outcome is not what was expected because, I think, NGINX bug - $wp->request parameter (obtained from $_SERVER['REQUEST_URI'] global) always indicates [login to view URL] file: [login to view URL]

More information:

Firstly, I am no NGINX developer. I do not have direct access to the NGINX config file but the server admins will make requested changes for me. Maybe something like the solution posted on this page is a close solution to my issue: [login to view URL]

---

WordPress code snippet, will be used once NGINX issue is resolved: [login to view URL]

Kemahiran: Apache, Linux, Nginx, PHP, Wordpress

Lihat lagi: digitalocean nginx reverse proxy, nginx reverse proxy ssl, nginx proxy_pass example, nginx tutorial pdf, nginx reverse proxy to another server, nginx reverse proxy ubuntu, nginx tutorial, nginx reverse proxy windows, know php server config, ubuntu server config samba, windows media stream server config, find server config file, dedicated server config, game hosting server config, unreal irc server config file, smartfox server config file, premade openvpn server config, server config till game hosting, linux server config, darwin streaming server config

Tentang Majikan:
( 0 ulasan ) Brooklyn, United States

ID Projek: #17853930

Dianugerahkan kepada:

dkokmadis

Hello from Greece, Do you have SSH access to the server? Would you like to have a chat? Regards, Dimitris

$155 USD dalam 3 hari
(428 Ulasan)
7.1

5 pekerja bebas membida secara purata $135 untuk pekerjaan ini

amiteshojha

Hi Sir, Hope you are doing well, I am from Best 3 tier Data Center Organization designated as Cloud & Linux Expert, I have more than 8 years experience in Linux Servers Setup, Configuration, Security, Web hosting, Data Lagi

$100 USD dalam sehari
(271 Ulasan)
6.8
gursukh

Hi I have 5 year experience I can show you my precious work. I'm Individual freelancer I have no timing issue I can do work any time day/nights. so can we discuss once thanks.

$111 USD dalam 2 hari
(99 Ulasan)
6.1
justdotweaks

Hello, I'm an independent web & app Developer . My Best goal is to create a product that is modern, user friendly and secure. My specialties: - Role modern and custom website designs - Role Mobile and tablet frien Lagi

$155 USD dalam 3 hari
(27 Ulasan)
5.3
alkajain2906

Greetings,
Thank you for posting a Job. I WILL DO THIS AS PER YOUR REQUIREMENT AND EXPECTATIONS. With the experience of over 300+web development projects including ANDROID, IOS, WEBSITES, WEB APPLICATIONS AND SOFTWARE Lagi

$155 USD dalam 3 hari
(12 Ulasan)
4.3