Questions tagged [nginx]

nginx (pronounced “engine-x”) is a lightweight, high-performance Web server/reverse proxy and e-mail (IMAP/POP3) proxy, licensed under a BSD-like license.

Filter by
Sorted by
Tagged with
1
vote
1answer
30 views

How do I redirect from an old domain to a new domain in MediaWiki and nginx?

I'm going to move from old domain to new domain. I fixed all the settings, but none worked. While entering the old domain name in the url, I will encounter the message of not redirecting to the new ...
1
vote
1answer
54 views

nginx how to configure nginx to nevigate to a subpage for reactjs app

I have following nginx setup where I used proxy configuration to redirect my landing page (built with reactjs) to my domain, say (www.example.com), here is my nginx configuration server { listen 80; ...
2
votes
2answers
70 views

Cloudflare plus Nginx plus Tomcat - is Nginx redundant?

With my past project, I have Nginx serving static files as well as being a reverse proxy for Tomcat (backend written in Java). There was no Cloudflare or other CDN. With my current project, I have ...
4
votes
1answer
120 views

Nginx reverse proxy into external cPanel server results in an error

I am trying to reverse proxy into a cPanel account by attempting to use the following Nginx configuration (123.123.123.123 is the cPanel IP), but I'm getting an error: ERR_TOO_MANY_REDIRECTS server { ...
1
vote
1answer
83 views

How do i setup a simple smart dns proxy service using nginx? [closed]

I have trying to setup a smart dns proxy service using nginx reverse proxy mode. its ok with http sites but i have issues with https sites. when i want to open https sites via my proxy i got following ...
1
vote
2answers
53 views

Redirect all requests to a subdomain except the root URL and index page under nginx

Up until now, our website consisted of a wiki with several wiki sites. We now decided to host some general information on a single page and move the wiki to a subdomain (https://wiki.example.com/). I ...
3
votes
1answer
52 views

ServerAlias directive not working on Apache 2.4.49

I have an instance of WordPress set up at https://wordpressinstance.example. I have an instance of MediaWiki set up at https://mediawiki.wordpressinstance.example. The MediaWiki instance is ...
3
votes
2answers
212 views

Is it possible for a hacker to point another domain at my domain?

Recently when I search my website on google, I find that another domain's description is identical to my domain. I'm terrified and try to understand the security breaches of my website as much as ...
2
votes
1answer
56 views

nginx configure error pages

Mostly that I need to be more familiar with the configuration of nginx and I have tried to search for an answer but have been unable to find one,I need to have all 401 403 and 404 errors directed to /...
1
vote
1answer
52 views

Configure nginx to set the content type from the URL only when there is an allowed user

I implemented a location configuration like this (legituser is set by a map lookup): location / { if ($legituser = 0) { return 200 "you are not allowed to access this url, please do bla bla ...
0
votes
1answer
29 views

Can I tell who is accessing archive.org archived documents from my site from my server logs?

I currently host a website with a collection of some of my projects, where a few of them are currently undergoing a patent review process. I don't want these documents to be public (though they were ...
0
votes
0answers
17 views

In nginx How can I replace invalid image with a valid image?

I have faced a problem. In my app there is lot's of article. So, this is not possible to remove the broken images from article body. So, I am thinking to remove that from server end. My server is ...
1
vote
1answer
34 views

nginx doesn't convert header to http_ variable

According to http://nginx.org/en/docs/http/ngx_http_core_module.html#http nginx takes http headers, does some conversions (set a prefix, replace dash with underscore) and provides them as variables: ...
2
votes
1answer
70 views

Block access to multiple files with .htaccess - RewriteRule and FilesMatch fail

I am trying to block access to specific files. Neither the RewriteRule or FilesMatch rules I have tried work on the live server, it serves the files as normal with status 200 OK (I'm expecting 404 ...
0
votes
0answers
22 views

get nginx proxy for https://hostname to work

I'm using nginx to proxy a site internal to our firewall. Right now the following urls work:     http://sitename (-> https://sitename.example.com)     http://sitename.example.com (-> https://...
3
votes
0answers
74 views

Configure Nginx to serve the home page and a sub-directory with WordPress and everything else with Laravel

I'm currently facing a problem where a single vhost must serve two apps. One of them is WordPress, the other one is Laravel. I've managed to get it some kind of working using a URL prefix, but I can't ...
1
vote
0answers
663 views

How do I troubleshoot 403 access forbidden by rule error?

In the first 40-50 minutes after I restart my server (Apache with Ngintron) I get a 403 nginx error, and in the logs it says "access forbidden by rule". I have all my traffic redirected to ...
1
vote
0answers
42 views

Using sub_filter command in Nginx by specifying its starting values

Seems like an odd request but I'm wondering if it's possible to alter values in nginx just by specifying several of its values. I've proxied my business website through nginx so I can have different ...
1
vote
0answers
28 views

How to display only subdomain and not IP address in address bar [closed]

I have a nodejs application running on EC2 instance. The nodejs application is running on port 7000, and I'm using nginx to listen to port 80 and forward any request to that port (so if someone type: ...
1
vote
1answer
39 views

Worth moving WordPress to Apache hosting to fix trailing slash duplicate content on Pantheon under Nginx?

Context: As you might know, Wordpress' permalink structure enforces a trailing slash at the end of URLs (so /about becomes /about/ etc.) I've always found this useful -- keeps URLs nice and uniform. ...
3
votes
0answers
150 views

Cross origin resource policy violation for JS file when setting COEP, COOP and CORP headers

What is the best way to deal with the new security headers? Cross-Origin-Embedder-Policy (COEP) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy Cross-Origin-...
0
votes
0answers
308 views

Nginx: could not allocate new session in SSL session shared cache “SSL” while SSL handshaking

What to make of this error? I get it a few times a day, often in a clump. 14 of them yesterday, scattered throughout, but with a cluster of 9 within a few seconds of each other. My first thought was ...
2
votes
1answer
155 views

nginx https ip address to domain redirect

My website is pretty messed up: it shows up as an IP address in the google search results (https). I want to redirect this to my domain, but when I couldn't figure out how to redirect https to my ...
1
vote
1answer
142 views

Nginx ERR_TOO_MANY_REDIRECTS by adjusting WordPress Permalinks | 301 Error Ubuntu 18.04

OS: Ubuntu 18.04.5 LTS (having my own VPS) WebServer: Nginx/1.18.0 MySQL: mysql Ver 8.0.22 for Linux on x86_64 (MySQL Community Server - GPL) WordPress: 5.6 When I change the Permalinks option in ...
0
votes
1answer
20 views

Moving https website from server A (CentOS 7) to server B (CentOS 8) - what do I need to do regarding certificates?

I've copied all of the referenced files in my nginx configuration over: /etc/nginx/ssl/STAR_example_com/ssl-bundle.crt /etc/nginx/ssl/STAR_example_com/STAR_example.key /etc/ssl/certs/dhparam.pem I ...
2
votes
0answers
31 views

Deny access to all the content of a section of website with Nginx from Plesk

I need to deny access to a part of website and allow some IP Addresses to access it for example my site is example.com it is accessible by every one but example.com/test and all its files are ...
1
vote
1answer
194 views

Generating Nginx log file entries for logrotate testing

How can I generate Nginx log file data for one or more test (burner) domains on a test server? I want to essentially mimic a live website with regular traffic being logged but without the provision of ...
4
votes
4answers
666 views

How to stop domains from pointing to my server IP address and duplicating my site using nginx

I recently created an Ubuntu server and installed LEMP stack after which I hosted my website on the server using WordPress. But after sometime, I notices some domains ranking in Google and loading my ...
0
votes
0answers
33 views

Set up SSL on NGINX

I'm having difficult setting up SSL on nginx running on Ubuntu. I have a .pfx, .crt, and .pem cert files to work with, but the documentation is for setting it up with .crt and .key files. The code ...
1
vote
1answer
34 views

convert htaccess to nginx [closed]

I want to convert this htaccess code to nginx. <ifModule mod_rewrite.c> RewriteEngine On ## Application Handler RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-...
1
vote
0answers
48 views

nginx location proxy pass forwarding to root URL rather than subdirectory

I am using Nginx as a proxy, example.com is my outward-facing web server with SSL enabled I want traffic coming under https://example.com/gibberish/ to be forwarded under http://localhost:8080/...
1
vote
1answer
124 views

Redirect AMP pages to non amp only for users using NGINX

We have a huge news website, with more than 10.000.000 views for month. We have amp pages, and now every indexed content in the google mobile serp is AMP. Basically only direct views go to the mobile ...
1
vote
1answer
52 views

www.subdomain.example.com not working despite trying various DNS entries and Godaddy forwarding options, can only get an nginx error

I have a website that is online at the moment. For this website, I have a subdomain staging.example.com. I am using GoDaddy for domain hosting. My server is on an EC2 Linux instance with AWS. I have ...
1
vote
0answers
10 views

Nginx Rule -Images Not Working [closed]

My .htaccess rules; RewriteRule ^img/([A-Za-z0-9]+)/([A-Za-z0-9]+)/(.*) /img.php?width=$1&height=$2&src=$3&crop-to-fit [NC] My Nginx Rules; rewrite ^/img/([A-Za-z0-9]+)/([A-Za-z0-9]+)/(...
3
votes
0answers
45 views

NGINX configuration for the same folder protection rewrites in each of thousands of subdirectories

The following code allows me to protect a specific folder with the membership software we're using. The problem is if we have 1,000 folders we need to protect, we need to copy/paste this same code for ...
2
votes
1answer
64 views

Detectify false positive (CVE-2013-1966 on uwsgi/nginx)?

Detectify has laready twice informed me of a vulnerability on my website. It is about CVE-2013-1966 (Apache Struts). However I am not even using Apache, my server runs Django on nginx. Can I safely ...
1
vote
1answer
61 views

Where To Configure SSL On Nginx Reverse Proxy or on Apache2 on Ubuntu 18.04 Server?

My question is about SSL/TLS. I'm running Ubuntu 18.04 server with: Apache2 serving 3 public domains on 1 public IP. On the same server I'm running: Nginx and will configure as a reverse ...
1
vote
0answers
55 views

How best to perform 4 million 301 jpeg URL redirects to content based addressing on nginx?

I certainly don't want to list 4 million redirects in my nginx config files... what's the best practice with a large number of redirects like this? They'd be permanent as well as the old links live ...
1
vote
0answers
109 views

Why is nginx trying to bind to an IP address that I'm not telling it to, and how can I stop it?

I'm trying to host two separate websites from my VPS. I have two services running on different ports. What I am trying to accomplish is have nginx reverse proxy to Service A if the user types in a ...
4
votes
1answer
7k views

Redirect all subdomains from one domain, to the equivalent subdomain of another domain using DNS and nginx?

I have foo.example and bar.example. I want sub.foo.example to redirect (not be aliased with) sub.bar.example, same for asdf.foo.example and asdf.bar.example, etc, for all sub domains. I know I can ...
2
votes
1answer
197 views

SYNC_NOT_REQUIRED in request URL leads to 404

We have noticed that our website Nginx access logs have quite a bit of 404 requests for very strange URLS that end in SYNC_NOT_REQUIRED Example: 75.139.245.82 - - [12/Dec/2019:22:36:29 +0000] "...
2
votes
0answers
45 views

NGINX - Proxypass limit inbound speed

I am currently using the following server block to proxy an IPFS server server { server_name ipfs.mydomain.com; server_tokens off; listen 443 ssl; listen [::]:443 ssl; location / ...
2
votes
0answers
835 views

Redirecting in NGINX with masking target URL

I've set up redirection on NGINX with the help of this answer and now I want to set up it with hiding redirection from user, i.e. keeping original example.com. Things I've tried: rewrite server{ ...
0
votes
0answers
179 views

Adding domain name to a Vultr managed Wordpress website

I have a managed Wordpress instance on Vultr. I was able to access the website fine with its ip address. Now after adding the domain, I can't access the website, "this site can't be reached, server IP ...
1
vote
0answers
9 views

Add Failthrough server of a LAN IP to Nginx?

I'm trying to add my machine's LAN IP as a 'failthrough' location to use in the event the main server has issues. Lately, my main server name (i.e. https://myserver.domain.com) has been having some ...
3
votes
0answers
86 views

405 for POST requests, download triggered for GET requests for specific php file only

Apologies, I know this is a basic question, but I'm learning nginx! I've inherited a Nginx driven site, the problem is that when browsing to a specific php file it initiates a download. The file, ...
3
votes
1answer
35 views

Mediawiki - Method for $wgActionPaths on nginx

I'm trying to set up action path rewriting on my mediawiki 1.33 install with nginx 1.14.0 on Ubuntu 18.04 with php 7.2fpm. All the documentation I've been able to find on mediawiki.org and via ...
2
votes
0answers
96 views

Nginx reverse proxy 404 multiple apps [closed]

I'm configuring nginx reverse proxy functionality. It's not working for apps as written below. I'll give you an example of /hbase/. When I enter url /hbase/ in browser, I get 404 it redirects to /...
2
votes
0answers
45 views

Is there a difference between server issue or control panel issue?

Is there a way to check if the issue is a server issue, or just a control panel issue? I ask this question to know when one can be accepted to ask on Server Fault, as required in their page What ...
2
votes
2answers
539 views

What makes Open Graph checkers unable to detect Open Graph data?

My page, after adding SSL certificate, cannot have preview fetched by Facebook or Twitter when sharing the link. I have followed The Open Graph protocol and include the following open graph tags: &...

1
2 3 4 5 6