Questions tagged [nginx]
nginx (pronounced “engine x”) is a lightweight web server and a reverse proxy server
1,011
questions
0
votes
0
answers
14
views
How to proxy password protected proxy by using nginx? Proxy_set_header Authorization does not work
I have a LAN proxy and I want to forward it to a server using Nginx. Here is my configuration:
stream {
upstream e_proxy {
server 192.168.23.23:10000;
}
server {
listen 10000;
...
-2
votes
0
answers
39
views
I have wrote a local C# ASP.NET server, and I want to host it on a domain. How can I?
I want my local server to be available to everyone. Basically:
localhost:9410 -> HTRex5.com
I have tried to port forward on my router and tried to access it through there, but nothing works. I'm ...
0
votes
0
answers
18
views
nginx website is extraordinarily slow but only for my network
My personal website has been extremely slow for only me and my network. If i connect to it via cellular data on my phone, or a laptop at another building, it is as fast as any other website, but when ...
1
vote
1
answer
43
views
How do I redirect 80 to 443 using NGINX and why does it seem to use both server blocks?
I have the following config for my NGINX
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include ...
0
votes
0
answers
19
views
Tomcat, NGINX, Vaadin, Spring Boot and LONG POLLING Push
I'm trying to properly configure LONG POLLING push with Vaadin (Java, Spring Boot), NGINX and Tomcat.
Sometimes Push stops working, and I suspect it may be the reason of some misconfiguration in my ...
0
votes
1
answer
45
views
WSL2 is not handling file permissions properly, unable to write files from PHP
I am running nginx, mariadb and php8.2-fpm on my WSL2 Ubuntu server successfully, all running as user www-data just fine, however, I cannot upload files from the web interface. When I attempt to, the ...
0
votes
0
answers
23
views
Verifying gpg keys through script
I am installing a package that needs gpg key verification check, i am able to verify those keys interactively but when i try to install the package through bash script i have to provide yum install -...
0
votes
0
answers
14
views
How to expose the Elasticsearch API via Nginx on Ubuntu?
I have Elasticsearch running on an Ubuntu 22.04 VM:
sergey@localhost:~$ curl http://localhost:9200/_cat/indices
green open .geoip_databases HPZPSV-wTIC8QRDJXPbQEg 1 0 42 5 40.7mb ...
2
votes
2
answers
177
views
packets pruned from receive queue because of socket buffer overrun
I currently have a high traffic nginx server. It seems generally one of the requests goes so slow or delayed and the other go okay.
When I run watch -d --no-title -n4 'netstat -s | egrep -i "lock|...
1
vote
0
answers
32
views
Obico Tunneling Nginx Configuration
ive got some problems with setting up obico tunneling as the documentation doesnt tell you how you need to configure nginx.
So you have following ports wich are for tunneling: 15853, 15854, 15855, ...
0
votes
0
answers
24
views
Enabling reverse proxy to subdomain on Nginx
I have MediaCMS set up on a subdomain, and I would like to be able to access it from path on the root domain. That is, it is currently hosted and accessible at https://media.example.com, and I would ...
0
votes
0
answers
14
views
Docker nginx image optional tls option
I need to create a nginx docker image, which can be used to configure optional TLS/SSL certificates.
When no certificate is provided, nginx should work as reverse proxy on port 80 and do its job. If a ...
0
votes
1
answer
37
views
Nginx autoindex is blocking IO on listing files
I recently encountered this issue where,
I served a data path using auto-index, within it there is a directory with a LOT of files (I have a directory with 1228240 files on btrfs). Accessing an ...
0
votes
0
answers
50
views
nginx stops working after several hours on macOS
I have nginx installed using homebrew on a dedicated admin user account on macOS Monterey. For some reason, at least once per day the server stops responding to requests and has to be restarted. It ...
0
votes
1
answer
88
views
Nginx proxy_pass with custom variable
I have a question regarding the proxy_pass and dynamic subdomains.
on my server, I have a site_block which looks like this:
upstream mydockersite{
server 127.0.0.1:8081;
}
server {
...
0
votes
0
answers
78
views
Start nginx without host container being available
For local development, I have a suite of 5 sites.
Each site runs in its own php-fpm container.
All sites are served by a single nginx container, which contains .conf files for all the sites. They ...
0
votes
0
answers
74
views
Nginx reverse proxy not working with Docker
I am running my node app (a REST API) on an AWS EC2 ubuntu instance that is already connected to my domain, let's call it example.org. I want to access my API on example.org/api/v1.
This is my default ...
1
vote
1
answer
81
views
Which Nginx modules should be removed when building a reverse proxy server?
I'll be compiling Nginx. The main purpose is to use it as reverse proxy. Also I would like to have the --with-http_auth_request_module enabled.
Which nginx module should I disable?
Is disabling the ...
0
votes
1
answer
135
views
Use nginx to serve SSH on different virtual server than HTTP(S)
My question is a bit different than serve ssh & https at the same time or redirect http requests to ssh. I don't want to multiplex the stream. I do have a virtual server to "spare" ...
2
votes
0
answers
228
views
How can I disable an Nginx cache for a specific route?
I want to disable caching for a specific directory: /sync/download.
My environment details:
OS Linux (rocky)
Server: nginx/1.20.1
I added this codeblock to my nginx site configuration:
location ~ .*...
0
votes
1
answer
161
views
How to use global variables like $host in included file?
I include part of configuration in my major configuration file
include /some/path/log.conf;
In that file I try to use $host variable
error_log /some/path/$host.error.log;
But it creates "$host....
0
votes
0
answers
285
views
nginx container reverse proxy to other containers on podman
Can someone point me to a NGINX Reverse Proxy container how to for podman? Most of the docs I find are for docker. Ideally I would like Nginx to act as reverse proxy so I can have multiple contains on ...
0
votes
2
answers
85
views
What's exact diff between `=` and `^~` Nginx modifiers?
As far as I've read/understood, both = and ^~ are normal string prefix modifier (neither is 'reg-exp' modifiers). Both allow only exact matches (otherwise its considered a non-match). And if exact ...
0
votes
1
answer
191
views
When I reloaded the NGINX with acontainer, I got the open() '/var/run/nginx.pid' failed (2: No such file or directory)
When I reloaded the NGINX with a container,
I got the open() '/var/run/nginx.pid' failed (2: No such file or directory).
How can I fix this issue?
0
votes
1
answer
29
views
A few doubtful nginx directives are confusing me
I was following this DO article: https://www.digitalocean.com/community/tutorials/nginx-location-directive
And have these doubts regarding nginx conf files directives:
What if there are 2 non-regexp ...
0
votes
1
answer
134
views
Django, Nginx, CORS issue when server behind upstream but if query server directly responds fine [duplicate]
I currently have the following nginx file
server_tokens off;
upstream backend {
server unix:/home/www/api.to/app.sock weight=1;
#server 1.2.3.4 weight=1;
#server api3.example.com weight=1;
...
1
vote
1
answer
84
views
Nginx cors issue when using upstream
I am pretty frustrated with this as I can not seem to figure out why this is happening.
I have a Django webapp that was working fine. When I tried changing the worker_connections I started getting ...
0
votes
0
answers
148
views
Getting a "too many redirects" with nextcloud and nginx
Trying to setup a webserver with the main domain going to a html file and the subdomain nextcloud going to, you guessed it, nextcloud. Problem is, it was working for a little bit, then suddenly ...
0
votes
0
answers
132
views
Securing Ghost blog with Nginx Proxy Manager
I know there are similar topics posted here, and on other sites but at this point I feel like I've read everything and nothing has worked for my configuration.
I’m running Ghost (v5.33.6) on docker (...
0
votes
0
answers
208
views
nginx rate limit doesn't work as expected
I'm trying to rate limit the nginx connections, however it doesn't seem to work as expected.
I tried to test it using 2 and 10 requests per second.
First, 2 requests per second
limit_req_zone $...
0
votes
0
answers
38
views
Nginx proxy menager server multiple subdomains on port 80
I just installed nginx poxy menager and nginx. I have a webserver on port 8021 and i want to have it on panel.mydomain.com:80 with https.
I'm trying to forward a webserver on port 8021 to a subdomain ...
0
votes
1
answer
93
views
ERR_INVALID_RESPONSE or "cannot parse response" in iOS
I'm getting ERR_INVALID_RESPONSE on Safari and "cannot parse response" from Chrome on my iOS device, but Windows, Android, Linux Desktop all work fine. Why?
I migrated a WordPress site from ...
0
votes
1
answer
793
views
How to remove trailing slash before URL parameters in Nginx
I have an simple Nginx site that runs a single PHP file regardless of the URL (except for CSS/JS files, which are served normally)
However, no matter what I do, and testing with multiple browsers, any ...
0
votes
0
answers
332
views
Reverse proxy and rewrite URL in NGINX
I want to redirect requests to our internal repository servers without edit repository addresses in package manager's configuration. Here is the scenario:
Add internal IP (NGINX Server) address to ...
0
votes
1
answer
87
views
Certbot on ubuntu 22.10
I'm new to running my own server so go easy on me please!
I think I messed up - went through the digital ocean droplet set up and didn't select the LTS version of ubuntu, so I'm on 22.10. Left certs ...
0
votes
0
answers
259
views
Have nginx route upstream based on hostname
I am currently trying to make a nginx file that routes the request to the 1 of two upgstreams (local or away server) based on the host. So for example I am trying the following
map $host $...
0
votes
0
answers
802
views
can't initialize iptables table `filter': Table does not exist (do you need to insmod?) - iptables is not present
I am trying to install NGINX and Certificate by following this article in WSL:
How to Install and Configure Nginx on Ubuntu 20.04
But at the Step 5: Allow Nginx Traffic, I am getting error after the ...
0
votes
0
answers
27
views
Have nginx check upstream servers for file
I want to set up a system with nginx in which a user sends a post with a file to say api.nginx and that box has two or more upstreams that will handle the request/store the file and respond with an id....
0
votes
1
answer
41
views
Disabling an IP based access to my Nginx site
I do not want people to be able to access my Nginx site, unless it is through the domain name. I have a Flash instance running that controls the requests. Anyways I have used this command,
server {
...
0
votes
0
answers
22
views
How to tell nginx to use different server_root for various subdomains?
I have a domain, let's just call it domainname.
The website for domainname is living under /var/www/html/domainname.
Both https://domainname and https://www.domainname should return this site.
However,...
0
votes
0
answers
45
views
Having an issue with GUID matching NGINX Expression in Location
Trying to write a REGEX that would match the following URI in NGINX:
/run-7d99e660-c9fe-11e8-a8d5-f2801f1b9fd1/
or any variation of that. However, I keep getting 404 when attempting to navigate to it. ...
1
vote
1
answer
283
views
Error 503 Backend fetch failed Varnish Docker
Server Information as follows
Plesk Control Panel
CentOS 7 Operating System
Nginx Proxy running on port 80
Apache running on port 7080
Magento Website
Elastic Search
Redis Cache
CSF Firewall
I ...
0
votes
0
answers
112
views
Running Datalust/Seq on Ubuntu, can't rich the UI
I just installed Seq database (v2022.1) on my Ubuntu (v20.04.4, it is a Server, not WSL) using it's official docker image (datalust/seq), following the steps described here: Getting Started with ...
0
votes
0
answers
602
views
Nginx, How To Allow HTTPS In IP With Different Port?
Is it possible to make HTTPS on IP with different PORT on NGINX server??
I'm having a problem with this I understand how to create an IP with a port but I don't understand how to make the IP with this ...
0
votes
0
answers
112
views
Getting around DS-Lite with reverse proxy in place
I have some things running on my home network that are available over the internet. But as my ISP does not provide me with a public IPv4 (DS-Lite), I can't reach them when only IPv4 is available, ...
0
votes
1
answer
712
views
Nginx how to serve text files with a “Content-Type: text/plain; charset=UTF-8” header?
How can I serve text (.txt) files with header Content-Type: text/plain; Charset=UTF-8 in Nginx?
I have a nginx/1.18.0 running on Ubuntu 20.04, and in nginx.conf I have this set:
http {
(...)
...
0
votes
0
answers
54
views
How to chroot nginx virtual hosts
I want to prevent php scripts inside virtual hosts from accessing files outside their document root.
How is this possible without using containerization ?
0
votes
0
answers
439
views
Static build of nginx with image filter fails
I am trying to build nginx from source with the http_image_filter_module but when I add it I get an error.
I run the command below, and it works until I add the --with-http_image_filter_module arg, ...
0
votes
0
answers
12
views
How to protect the URL that identifies the file location when using X-Accel?
I am using internal directive to protect folder from being accessed from external requests:
location /protected_files {
internal;
}
The folder stores images.
In my frontend, I create <img> ...
0
votes
1
answer
62
views
How to mask protected folder path to make it look like it's served from another location?
I am using X-Accel to serve protected folder that contains images: https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/
Currently I store the files in the /protected_files folder. So ...