Skip to main content

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
0 votes
0 answers
14 views

Trouble Implementing a Reverse Proxy for my Web App

I am using AWS Lightsail and Apache to host a web app on a Static IP. I now want to move that web app to a custom domain that I own, such that when I enter that domain I am taken to my web app, with ...
aayush's user avatar
  • 101
0 votes
0 answers
12 views

nginx .conf redirect to 404.php

have this .conf file to my website, but everytime it should redirect to 404 page it says file not found, however if it goes to a normal page it works always. server { listen 80; server_name ...
tiago calado's user avatar
2 votes
0 answers
34 views

Nginx Vs. Apache

Odd question and I know there are about 8 million sites out there about the subject. I am old school and just straight old. I remember the days of compiling Apache when the only options was to compile ...
Tamer Ziady's user avatar
0 votes
0 answers
18 views

How to serve unique error pages for each subdirectory using Nginx?

I have a directory where are many Jekyll sites with their own themes, etc. I want to serve unique error pages for each Jekyll site. In each directory there are such files: # ls /var/www/pages/ site1 ...
lotigara's user avatar
0 votes
0 answers
21 views

How can nginx report empty `ssl_protocol` when successfully handling a query with TLS?

I have an nginx proxy which is handling requests in a server block like this (redacted): http { log_format testformat '[$time_local] [$remote_addr] [$ssl_protocol] [$status] $request_method:$...
gubbins's user avatar
  • 101
2 votes
0 answers
49 views

hosting multiple websites in the same server

I have a server that has multiple websites, when i access one of them by the ip address or domain name it directs me there with no problem,the rest are accessed by a domain name without any problem, i ...
a user's user avatar
  • 21
1 vote
1 answer
364 views

Plesk - How to hide port in Nginx forwarding / change listening port?

I installed the Docker extension in my Plesk Obsidian. Then I installed a docker image that raises a web server on localhost:8443. It maps the port 8443 on a chosen target port (let's say 12345). Then,...
jasmines's user avatar
0 votes
0 answers
15 views

Avoid sharing objects between contexts using nginx and ember.js

I have 2 differents applications in ember.js: "host1:3000/appA" and "host2:3001/appB". I use nginx so that the client can access appA and appB through a single domain, that is: &...
Torprendido's user avatar
2 votes
1 answer
67 views

Redirect to HTTPS only works the first time on Nginx

I'm currently trying to setup redirection from HTTP to HTTPS in Nginx. Used ports: HTTP: 8085 HTTPS: 443 When I access the site via http://example.de:8085 initially, I am correctly forwarded to ...
Lukas's user avatar
  • 23
0 votes
1 answer
44 views

Nginx not redirecting to specific page

I want visitors to domain1.example to end up at a specific page on domain3.example. For testing, the DNS of domain1.example points at domain2.example and I have the following Nginx rule on domain2....
user77510's user avatar
  • 123
0 votes
1 answer
126 views

Modsecurity Nginx breaks Wordpress's Woocommerce checkout page. Need help finding working rule exclusions

I am running an Ubuntu 20.04 based LEMP server on a Raspberry Pi 4. I am working on a Wordpress Woocommerce website at https://www.mcmo.is. Currently on iOS using Safari or Google Chrome, I can't get ...
DanRan's user avatar
  • 101
1 vote
0 answers
34 views

Nginx seems to be redirecting to wrong proxy_pass

This is a project for a cryptography class where I'm learning about self signed certficates and I chose nginx to help me with my app. I have a docker-compose.yml that hosts a python api, postgres, ...
Luca Moreno's user avatar
1 vote
0 answers
316 views

My server is returning "301 moved permanently" to some sketchy site

ping returns the correct IP address, but a curl to the IP address or domain returns: <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white&...
Nikolay Dyankov's user avatar
2 votes
2 answers
305 views

Trying to block images from google image indexing but not working

I am trying to block images from google image search, but for some reason they are not working. I have a Wordpress self-hosted blog and I have full access to the backend. HTML of mydomain.com looks ...
cyanite's user avatar
  • 21
1 vote
0 answers
132 views

Suspicious requests to nginx web server

Periodically, the nginx web server receives a lot of requests from the same IP address: $ cat /var/www/site.com/logs/access.log | grep '213.80.239.170' 213.80.239.170 - - [14/Mar/2023:11:05:03 +0600] ...
AziAd's user avatar
  • 11
3 votes
1 answer
163 views

How to modify $uri to avoid HTTP-Splitting vulnerability

How can I modify below block to overcome HTTP-Splitting vulnerability. There is an official recommendation to instead use $uri_request but unfortunately that doesn't work for below code. location /...
JM John's user avatar
  • 43
1 vote
1 answer
422 views

WordPress nginx proxy manager + apache: redirect loop

I've moved (manually, db backup + folder transfer) 4 wordpress websites from one host to another, maintaining the same configuration (nginx proxy manager in docker on 80/443 plus apache on 444/https). ...
Nik Rubblers's user avatar
1 vote
0 answers
17 views

Nginx proxy w/ modified URL

I am trying to make my website example1.com show the contents of example2.com. Basically, my goal is to create a proxy when /telehealth is visited but w/ a modified proxy manner. Such as when example1....
Dean Christian Armada's user avatar
2 votes
0 answers
46 views

strange nginx route resolution

I installed a fresh ubuntu 22.04.1 LTS on a VM, then nginx (nginx/1.18.0 (Ubuntu)) serving (for a while) at http://164.67.176.22/ . the server config file is default, with addition only of /wth: ...
ivo Welch's user avatar
  • 121
3 votes
3 answers
2k views

Reverse proxy SSL with Nginx, do I need a wildcard or a separate cert for every host?

I have Nginx setup and successfully serving SSL to example.com using certbot/letsencrypt. But when I try to reverse proxy to a local machine I get NET::ERR_CERT_COMMON_NAME_INVALID. Here's the ...
THE JOATMON's user avatar
1 vote
0 answers
162 views

Do I need to buy a domain for each sub domain I want to use with nginx?

I want to set up an nginx server on a vps to reverse proxy to some Minecraft servers that I am hosting and running locally on my home IP. I understand I will need to buy an A record for my domain(I ...
shirolight's user avatar
2 votes
1 answer
43 views

Why has someone copied my website, and why is it showing up as a referral in GoAccess?

I recently created a simple website to serve as a resume. I run it off of a VM that I configured myself with Ubuntu and Nginx. I also installed a tool called GoAccess that allows me to see things like ...
Vallium Overdose's user avatar
0 votes
1 answer
1k views

Is it possible to detect that site is using reverse proxy?

If one will reverse proxy a site (copy) - how would one know its reverse proxied and not a real site? Is there a simple method to detect without content plagiarism tools etc?
Adolaz's user avatar
  • 1
1 vote
0 answers
332 views

Plesk Obsidian (18.0.48) - 413 Request Entity Too Large (nginx)

Hello recently I set up a server using Ubuntu 22.04.1 LTS and Plesk Obsidian 18.0.48. However I encountered a problem when uploading files around 1GB of size. The website I am running is a docker-...
Anbosuki's user avatar
1 vote
0 answers
119 views

Can Nginx get the client requesting IP address or URL?

In the config file of Nginx there's: proxy_set_header X-Real-IP $remote_addr; Just wondering if there is any way you can figure out if the request is accessed from a request URL: example.com or the ...
tipsywacky's user avatar
1 vote
0 answers
33 views

How to run a nodejs app over HTTPS?

I have a node.js app that I want to deploy on a VPS. So I ran the app on port 8080, then went to IP_ADDRESS:8080 and the website was there. So the next step was removing that port number because I don'...
Alej4ndr0's user avatar
0 votes
1 answer
535 views

Reverse proxy pass websocket request with PHP in apache

I have a websocket server that I need to protect behind a PHP session and currently I'm unable because I can't make PHP to reverse proxy to the websocket server. Let's go to the details. I have a ...
Worsha's user avatar
  • 15
2 votes
2 answers
43 views

Renaming subdomain and keeping traffic

I would like to use a reverse proxy (NGINX) to redirect traffic from let's call it SUBDOMAIN1.example.com/EXAMPLEPAGE to SUBDOMAIN2.example.com/EXAMPLEPAGE Currently, I rank position 1-2 for most ...
Nassocci's user avatar
0 votes
1 answer
3k views

nginx Content-Security-Policy headers: why do they have to be all on the same line? (version 1.18 vs 1.22)

I have two different servers, one using nginx 1.18 and another using 1.22. The headers on the 1.18 version are: add_header Content-Security-Policy "default-src 'self' 'unsafe-inline'; ...
Carlos M's user avatar
  • 103
2 votes
1 answer
1k views

Nginx URL rewrite with static .html files for SEO

I'm trying to setup a Nginx configuration for nice URLs without .html extension. What I currently have works, but the / URI redirects to /index and I don't want that. The URL rewrite rules should be ...
Rumplin's user avatar
  • 123
1 vote
0 answers
73 views

How to disable direct media file access in Nginx or Ubuntu for non-logged-in users?

I am trying to disable direct URL access (for images, PDF) to my WordPress websites for non-logged-in users, I have created one '.htaccess file' under - wp-content/uploads/.htaccess RewriteCond %{...
Ricky's user avatar
  • 11
0 votes
1 answer
969 views

DNS_PROBE_FINISHED_NXDOMAIN when serving multiple subdomains with nginx

On our research project, we have an Ubuntu 20.04 LTS virtual machine running, which should serve via nginx multiple project related websites/apps on different subdomains. The setup is supposed to be ...
Stefan Boehringer's user avatar
3 votes
1 answer
491 views

Nginx error 400 through Cloudflare

I recently added my site to Cloudflare and all of my subdomains like portainer and my file server are working however my main domain that points to my Nginx server returns "error 400 bad request ...
George Johnson's user avatar
2 votes
0 answers
57 views

Googlebot tries to access links from another unavailable website

I'm getting a bit paranoid because there's been a small breach on my web server recently and that linked to this I found multiple logs like this from nginx: access.log-20220602:66.249.70.69 - - [01/...
SilentSib's user avatar
2 votes
0 answers
64 views

Nginx unclear about non HTTP requests

Today my website server had to be restarted. It seems it faced an important number of requests that do not look like HTTP ones. While the density of requests reduced, I can still see some of them ...
AlixL's user avatar
  • 121
-1 votes
1 answer
266 views

Missing SSL certificate cause unwanted redirect to another website

I have a website without SSL certificate. When opened in browser it shows error message: "Potential Security Risk Ahead" which is good but when click "accept the risk and continue" ...
Jan Husák's user avatar
0 votes
0 answers
217 views

Redirect wildcard domain to another one in nginx

I have two websites *.env1.example and *.env2.example, I want to redirect all traffics in env1 to env2, how to do so in Nginx? I do redirect from one specific domain to another, but now I want to ...
Mohammed Ahmed Bahashwan's user avatar
0 votes
0 answers
1k views

What is reddit's user agent?

Does anyone know what the user agent is for reddit? I have hotlink protection enabled on my site but I want to allow a reddit to hotlink my image however I don't know know what their user agent is.
TravelWhere's user avatar
2 votes
1 answer
134 views

Nginx access log clarification

I noticed the below line of log in the nginx access log file. What does it mean? 15.23.35.45 - - [19/Feb/2022:07:09:25 +0000] "" 400 0 "-" "-"
krkart's user avatar
  • 123
3 votes
1 answer
3k views

Why Doesn't "location /" Match Every URI in Nginx

In Nginx, according to this question's answer https://stackoverflow.com/questions/59846238/guide-on-how-to-use-regex-in-nginx-location-block-section when using no modifier between the location ...
Harry Muscle's user avatar
5 votes
1 answer
2k views

Is it safe to use 777 for my public html folder?

Running a Linode and I want to install Nextcloud, but it needs permissions to write to the directory (/var/www/html). Doing a chmod 777 will clear things up but I wonder if it's safe to use that open ...
liminalFrog's user avatar
1 vote
0 answers
77 views

How to redirect if user direct access image files by browser? [nginx]

How do I redirect if a user tries to direct access image files in browser only? I want to still keep the ability to allow social media sites to embed our images by hotlinking. I just want only if a ...
TravelWhere's user avatar
1 vote
1 answer
176 views

How to cache the html file of redirected website

I have a website A whose content gets updated every minute(Its content is related to stock price). However, because displaying the content of website A requires expensive computation, I want to create ...
John Doyle's user avatar
1 vote
1 answer
534 views

The role of server_name in DNS resolution and redirects in nginx

I understand there's a name resolution. For instance, I have a DNS A record I think and it redirects everything that goes to bi.example.com to www.example.com, which is the hostname of the server. But ...
Sayaman's user avatar
  • 113
1 vote
0 answers
199 views

Nginx works on http but not on https, showing welcome to centos page

I am trying to server flask application with ssl enabled. myproject.service file: [Unit] Description=Gunicorn instance to serve myproject After=network.target [Service] User=userone Group=userone ...
alexis's user avatar
  • 11
1 vote
1 answer
124 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 ...
Sokot Zaman's user avatar
1 vote
1 answer
2k 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; ...
Md. Tanvir Raihan's user avatar
2 votes
2 answers
173 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 ...
Yuriy N.'s user avatar
  • 195
6 votes
1 answer
637 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 { ...
Toodarday's user avatar
  • 123
1 vote
1 answer
287 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 ...
rmasoumvand's user avatar

1
2 3 4 5 6