Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nginx]

Nginx ("eNgine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

-2
votes
0answers
15 views

Tor service not working every time I restart, saying active (exited) [on hold]

I am trying to run the tor service on a Debian Stretch machine, and it works intermittently. However, after every successful start, upon the time I try to start it again, it doesn't work. When I run "...
0
votes
1answer
17 views

nginx reverse proxy for docker swarm - 502 bad gateway

I am running a docker swarm on "swarm.example.com". On the server, there's a container running that can be accessed on "swarm.example.com:3000". On server "example.com" I'm running an nginx reverse ...
1
vote
0answers
14 views

Nginx redirecting me incorrectly despite my configuration

Ok, so I am working for this new company and was not able to obtain any knowledge from their old developer about the nginx configuration. Everything has been fine until I starting running into this ...
1
vote
1answer
34 views

Fail2ban bans IP, but not until it already has hundreds of requests

I have a jail that picks up on a specific user agent. It eventually bans it, but it still gets by with several hundred requests. Here is the relevant info (unless anything else is needed): Ban ...
0
votes
0answers
19 views

nginx http server location include unknown directive error

my nginx.conf worker_processes 1; events { worker_connections 1024; } http { upstream app_servers { server 127.0.0.1:5000; server 127.0.0.1:5001; } server { ...
0
votes
0answers
17 views

nginx domain to specific port [duplicate]

I'm having an ubuntu server with apache2 and nginx. The apache2 listening to port 80 and nginx on 8000. (php project is runnig on 80 and flask uwsgi app runnig on 8000) I have two domains www.example....
0
votes
1answer
19 views

Nginx load certificate files based on host

I want to serve the right ssl certificate based on the $host variable with an exception for any host being *.mydomain.com or mydomain.com The certificates fall in two groups: Local certificates: *....
1
vote
0answers
15 views

Prevent “hostmaster” subdomain from redirecting to the main site

I host mainsite.com and othersite.net on a single Debian 8 server with nginx/1.6.2. Recently I discovered that Google indexed hostmaster.othersite.net and this subdomain shows full content of mainsite....
0
votes
0answers
29 views

nginx: [emerg] “user” directive is not allowed here in /etc/nginx/sites-enabled/nginx.conf:1

I'm trying to install Oxidized on an Ubuntu 18.04 LTS server. I use Nginx as wab server and at a moment, it is said that I have to modify the file "/etc/nginx/nginx.conf", which I did by correctly ...
0
votes
1answer
17 views

Nginx Reverse Proxy with multiple servers

Here is my situation: I will have one server running nginx, and two servers running apache + tomcat I am NOT trying to do any load balancing. What I need to do is setup nginx to proxy connections ...
0
votes
1answer
24 views

CLIENT IP - PROXY forward packet - SERVER receiving real client IP on port 123

As I explain in the title.. I am trying to use a VPS that connects to my real secret server IP, this can be done easy with iptables but I lose the client IP and this is big problem, I would like to ...
0
votes
1answer
11 views

Nginx rewrite prevent redirection

I am trying to make a url rewrite as following: location /statics/ { alias /var/project/statics/; } location /statics/cache { rewrite /statics/cache/(.*?)/(.*)$ http://$host/statics/$2 ...
1
vote
1answer
22 views

Nginx automatically adds wildcard to redirects

I am making some redirects with nginx, but for some it automatically matches everything at the end of the URL, which creates redirects to the wrong pages. I have these two redirects. location /en/...
0
votes
1answer
28 views

Nginx not scaling more than 750 connection when used as reverse proxy

I have a mobile application in which we are using Nginx as a Reverse proxy which routes request to Nginx. The Nginx request in app server is passed to Node.js for processing. We are getting 504 ...
0
votes
0answers
17 views

How to combine this set of nginx directives into one regular expression rule

I have these working directives: location /en/tools { alias /srv/nuxt/tools/dist/en/tools; try_files $uri $uri/ @cache; } location /ar/tools { alias /srv/nuxt/...
0
votes
0answers
11 views

Change Certbot plugin

I have a web server running multiple sites on nginx. They are secured by certificates from Lets Encrypt. For some reason, long ago, I installed the certs for one site using standalone rather than the ...
0
votes
0answers
24 views

Nginx regex based location directive does not capture whole requested path

I have this location directive: location ~* ^/(_nuxt|_libs|_img|_fonts)/(.*) { alias /srv/nuxt/tools/dist/$1; try_files /$2 =404; } This matches and serves successfully: /...
1
vote
1answer
24 views

Make trusted self-signed certificate not register as “self-signed” (i.e. trusted) on private network

I'm currently implementing a private Docker Registry server with nginx configured to forward https traffic securely to the running Docker Registry (i.e. docker-compose) instance on a private network (...
0
votes
1answer
19 views

how do I use or reuse the same map signature/arguments/variables across different server configurations in nginx

I am trying to get some redirection done via nginx maps. I have separate server blocks for individual domains,[and their aliases], say: www.example.fr www.example.uk www.example.nl Each within its ...
0
votes
0answers
28 views

nginx: Redirects URL's to extensionless pages not working on home page

I'm trying to automatically redirect pages with a PHP extension to a non extension page version e.g example.com/page.php to example.com/page. I've managed to get this working for all pages except my ...
0
votes
0answers
11 views

If statement in NGINX (port forward http -> https) with google cloud loadbalancer

I just want to ask an opinion about using an if statement on NGINX server. What is the deal: I'm configuring GCP HTTP(S)load balancer for a laravel app, but the thing is GCP LB it doesn't support ...
0
votes
0answers
17 views

NGINX subdomain hangs and times out

I have a site working on the root and www domain, e.g. example.com and www.example.com I'm trying to add a new site under the subdomain t.example.com. When I visit this subdomain in a browser it just ...
0
votes
1answer
27 views

How to redirect multiple domain to same ip but different port for different services [duplicate]

In my VM, i'm running both apache2 and nginx, but apache2 is pointed to Port 8080 and nginx is Port 80. Already i pointed my domain to ip in nginx and its running properly. The same thing i need to do ...
0
votes
0answers
16 views

Streaming proxied responses with gzip on nginx

I have an nginx reverse proxy in front of a node.js backend server. In my node app, I am able to stream responses as they become ready, so that the client can start downloading resources referenced in ...
0
votes
0answers
39 views

How to dismiss nginx warning message nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (13: Permission denied)

I'm running nginx using common user not root. I have nginx installed system-wide, but have nginx.conf in HOME. $HOME/nginx/nginx.conf worker_processes 1; error_log /home/worker/nginx/log/nginx/...
0
votes
0answers
24 views

How to configure NGIX to do not overwrite SSL certificate of Apache

I need to proxy HTTP requests over NGnix. However I would like that SSL is managed only by Apache server. Is it possibile to configure NGINX to don't act asterminal endpoint of SSL and just being "...
2
votes
1answer
16 views

nginx map rules, case insensative

I'm trying to force a URL to point to a new location. For example: site.com/Gites/ site.com/gites/ I currently have a "map" set up on the site: map $uri $is_rewrite { default no_redirect; ...
0
votes
0answers
14 views

Browser caches the rewrited url. How to stop it from being cached?

I'm using nginx to rewrite a url location /ReeferUI/Reports/ { rewrite ^ /ReeferUI/index.html break; proxy_pass http://localhost:8083/ReeferUI; proxy_set_header Host $host; ...
2
votes
0answers
18 views

Use S3FS Mount As HTTP Server Document Root

My proposed setup: An EC2 server running Apache or nginx. An S3 Bucket in the same region/availability zone mounted with S3FS. The Apache or nginx document root set to the S3FS mount. My question: ...
1
vote
0answers
16 views

Is it possible to use Opcache to specific website only?

I run few wordpress websites on single Vps server. (Ubuntu 18.04 + Nginx + php7.3 + mariadb) I was changed code like below to use opcache in php.ini. opcache.enable=1 opcache.enable_cli=1 opcache....
-2
votes
0answers
16 views

How to except fastcgi cache for woocommerce?

I run Woocommerce on Nginx + Mariadb + Php7.3-fpm + Ubuntu 18.04 server. I googled about excerpt fastcgi cache for woocommerce but so many options i was found. i was put below code in my server ...
1
vote
2answers
42 views

How to get an access from external ip to internal ip using NGINX on GCP?

I can't connect to an application through an External IP. I started a gerrit code review application on a GCP's Compute Engine instance (with CentOS 7). It works on a console, by curl http://...
3
votes
0answers
30 views

Need to rewrite domain with specific criteria on Nginx

I have a server with multiple domains pointing to it (it has Wordpress Multisite running on it). One of those domains (e.g., mydomain.xxx) I need to redirect to another domain, which is on a ...
0
votes
0answers
16 views

autoindex list UTF-8 charset in Nginx

My nginx autoindex page does not display UTF-8 characters correctly, utf-8 problem I have set the charset utf-8; in my server block config section of nginx.conf file but that doesn't seem to fix the ...
1
vote
2answers
339 views
+50

Serving a static website with nginx. Response time over 600 milliseconds. What’s wrong?

I serve a wordpress blog with nginx http cached to over 99% of the requests with a cache lifetime of 2 days. Here’s a webpage from the site. The webpages have quite a few images and therefore lazy ...
2
votes
1answer
27 views

Connect to localhost development server in docker bridge network

Within a docker container I have a development server running that runs at: http://127.0.0.1:8000/ Via nginx I am trying to make a request to this server: nginx.conf upstream service_rest { ...
0
votes
0answers
46 views

(404 Errors) Why are hackers looking for directories named “/najwutoanfga/” and other 10-12 char strings of random letters?

I was looking through the 404 errors of my nginx logs today to see what the hackers are trying to do on my website. I usued this command: cat access.log | grep '404' I saw the usual requests for ...
0
votes
1answer
21 views

Nginx ignore loaded config and search in “/etc/nginx/html/index.html”

I update nginx to 1.16 and my website stop to work. It look for file in "/etc/nginx/html/index.html" Here is the log 2019/05/10 18:16:24 [error] 125559#125559: *1 "/etc/nginx/html/index.html" is not ...
-1
votes
0answers
41 views

Server receiving hit from its own DigitalOcean public IP Address. Why is that and how to resolve this?

I have a MEAN Stack application deployed on a Digital Ocean Droplet and I am using Nginx as proxy server to handle the request and redirect to application's particular port. I wrote a short script in ...
0
votes
2answers
99 views

Passing Nginx custom header or variables to SSI

I'm building web app using SSI to reduce server usage as much as possible (since it small VPS), one of the issue I face is serving different contents/style to mobile users I use custom detect-mobile....
0
votes
0answers
19 views

Nginx rewrite speed for one location with multiple rules [closed]

I am trying to setup rewrites so that requested URLS behave like the following /newsletter/2019/05 is a rewrite of /newsletter.php?year=2019&month=05 and /newsletter/2019/05/yes is a ...
0
votes
2answers
23 views

regular expression that has /admin in the middle and whole string ends with specific format

I am trying to write a regular expression such as it has /admin in the middle and ends with .css or .js or other formats. http://example.com/admin/static/style.css (SHOULD WORK) http://example.com/...
0
votes
2answers
70 views

Why is www.domain.com not redirecting to domain.com?

I want www.lizardgizzards.com to redirect to https://lizardgizzards.com But instead it redirects to https://www.lizardgizzards.com Here's my redirect config: server { listen 80; ...
1
vote
0answers
37 views

configuring subdirectory in a wordpress installation for proxy pass to docker application

I have a wordpress installation using Nginx as the web server, now there is a need of adding moodle as the LMS to the same site, as a subdirectory, for example; www.mysite.com is where the wordpress ...
-1
votes
1answer
44 views

Nginx redirect without a server name [closed]

I'm serving a webpage from an embedded linux box that may or may not be connected to the internet. The idea is, a user enters the IP of the machine and the page comes up. I want to redirect all non-...
-2
votes
0answers
429 views

index.php doesn't gets default redirect inside subdirectory [closed]

In the root directory, any redirect to localhost/ is simply redirected to index.php, but if you go inside the localhost/phone subdirectory, there's an index.php page too, and as you type localhost/...
0
votes
0answers
20 views

Nginx - How to replace string

The request coming to the server at port 5082 as below GET /iFooBar?mode=update&av=V12-00-068_466533&rv=0&sv=0&os=Linux&os_arch=aarch64&os_ver=4.15.0-1031-raspi2 HTTP/1.0 i ...
0
votes
0answers
35 views

Configure nginx with domain and subdomain

I have set up Nginx with example.com to point to /home/public_html/ which is root folder of app. I also configured Nginx as proxy pass to Varnish and SSL termination. Everything working. As I am ...
0
votes
2answers
57 views

Nginx root not working as I expected

I am trying to achieve the following: The root of my domain http://www.paulix.local/ should server the file located at /var/www/html/main/webroot/index.php The url http://www.paulix.local/...
0
votes
1answer
32 views

Set timeout on specific url NGINX

I already asked this question on StackOverflow but unfortunately no-one had an answer. I am currently using NGINX as a revers proxy (because I am using a few docker containers) for an API (apache) I ...