Questions tagged [nginx]
nginx is an open-source Web server and a reverse proxy for HTTP, SMTP, POP3 and IMAP protocols, aimed at high performance and low memory usage.
705
questions
0
votes
0
answers
17
views
What is the rewrite rule to redirect a URL with dot character inside of it
I have mistakenly submitted somewhere a URL that is like /stuff-stuff-stuff.doc/. I have changed it to /stuff-stuff-stuff/ but I am failing to set up a redirect from the old one. I suspect it's ...
0
votes
0
answers
6
views
Turn server doesn't give any ice candidates behind NGINX when requested from a firefox browser
I am trying to add NGINX infront of my TURN server, I am using the coturn package.
My NGINX conf looks like this.
upstream turn
{
server 127.0.0.1:5349;
}
...
0
votes
0
answers
30
views
500 Internal Server Error on multiple applications with NGINX
I have 2 APIs that I want to serve and I do not have domains, I want to be able to do this
http://anIPaddress/ #another app
http://anIPaddress/api/firstlevelroute
To achieve that I tried this ...
0
votes
1
answer
45
views
Move a line of text to a (new or existing) file, where the target (sub)directory is determined from the source file
I have a custom Nginx access log where each line begins with a ISO8601 timestamp ($time_iso8601 in Nginx parlance) and an epoch timestamp to millisecond decimal points ($msec in Nginx). Like this:
...
0
votes
0
answers
30
views
Nginx gives 404 error when a URL is entered
Im trying to serve some files that are generated from a computer program that feeds feeds into a PHP script. The only issue is the files in which I want to server are deep within the linix file ...
1
vote
1
answer
29
views
Running Nginx as different user; updating WordPress returns "The update cannot be installed ..." error
This is my first foray into customizing Nginx, which I have running on a Digital Ocean droplet. My site files are located in /sites/rob_app.
everything is owned by rob
all files are 0644
all ...
0
votes
1
answer
42
views
How can I share files on the server with others users in internet?
I have a linux server that I manage via SFTP and SSH. Some files are generated on the server through scripts. How can I make it so that I can give users on the Internet links to specific files (so ...
0
votes
0
answers
29
views
Only allow local addresses using nginx reverse proxy when accessed from external web URL address
I have set up a vaultwarden server locally, nginx and have linked it to the website xxx.ddnsfree.com. I can access it fine using xxx.ddnsfree.com.
I am trying to make it so that I can only access the ...
0
votes
1
answer
92
views
Some secret service is taking over port 80... I can't identify which one?
I have an nginx service that resides on ports 80 and 443 and has done som for years. Yesterday I suddenly just got a plain text page with a 404 page not found message
Headers:
HTTP/2 404
content-type: ...
0
votes
0
answers
568
views
how to make Nginx use home directory as root
I have set up a local server on my laptop for web development and to check the website I'm working on I should have my code base in /var/www/example.domain which is not so convenient, I want Nginx to ...
0
votes
1
answer
63
views
E: Version '1.14.0-0ubuntu1.9' for 'nginx' was not found
FROM ubuntu:bionic
ENV NGINX_VERSION 1.14.0-0ubuntu1.9
RUN apt-get update && apt-get install -y curl
RUN apt-get update && apt-get install -y nginx=$NGINX_VERSION
CMD ["nginx&...
0
votes
0
answers
64
views
Nginx self-signed cert
If I want to transport the self-signed certificate from another server to the Nginx server, do I have to choose the public certificate or the encrypted one with a key?
I mean when I export the ...
0
votes
0
answers
225
views
How can I configure NextAuth behind Nginx in a local environment?
I hope you can help me.
Currently I'm working with a local environment with docker compose, I built a NextJS site with NextAuth. I've configured a Nginx as a proxy, but I have a problem when I try to ...
1
vote
1
answer
118
views
Use nginx as reverse proxy for all Docker containers
I'm running Docker on my Raspberry Pi 4 with some containerized web apps and I want all traffic to go through nginx as reverse proxy.
My problem is that I can access the Docker container ports from ...
0
votes
0
answers
67
views
Find different IPs at the same time in the nginx access log file
I need find diffrent ip on same time in nginx access log
my log is:
5.218.148.20 - - [28/Nov/2022:18:49:07 +0330] "GET /family HTTP/1.1" 101 8140 "-" "Go-http-client/1.1"
...
0
votes
1
answer
71
views
systemd configuration reset?
Having already queried on the matter of syntax for restarting a server and having modified nginx.service by adding Restart=always for a few servers, a few weeks later I find the configuration file is ...
0
votes
1
answer
1k
views
FastCGI sent in stderr: "Primary script unknown "
I'm running a nodejs project with nginx and wordpress in /blog subdirectory with aapanel control panel. When I want to access example.com/blog there is a "File not found." error.
Here is ...
0
votes
0
answers
190
views
Rotate nginx logs by size
I want to rotate nginx logs when they reach 10MB. Below the config that I have:
/usr/local/nginx/*.log {
size 10M
daily
missingok
rotate 5
compress
...
1
vote
1
answer
551
views
docker-compose and nginx: always getting 127.0.0.1 as client IP
I've created a Docker image which contains nginx server (manually installed, not using the nginx docker image). Wherever I access the web server from, I always see 127.0.0.1 as client IP address. I ...
0
votes
0
answers
253
views
Read access for Nginx, write access for developers
What are the best-practice permissions one should set in this scenario?
The document root is owned by the PHP-FPM user ("website user") who needs to be able to read and write folders+files ...
0
votes
1
answer
28
views
How to limit access to domain in VPS, Nginx?
I have a debian VPS with Nginx reversed proxy for my website. And forward DNS domain to my VPS. My question is, how to limit access to public for access my website through domain?
For example, i have ...
1
vote
0
answers
164
views
Setting ACL recursive execute permission on a folder makes files executable
Running Ubuntu 20.04 LTS running Nginx 1.18.0 and PHP-FPM to serve a website.
I create a new folder as document root in /var/www, owned by the the FPM user foo, that will host a site:
$ sudo mkdir foo
...
0
votes
1
answer
262
views
symlink doen't works with nginx and php-fpm and docker
I run a wordpress site in local wiht docker, and in a plugin I send a GET request for a style.css file, which is a symlink, and it doesn't work, it answer a 404 not found
I don't think the probleme is ...
0
votes
0
answers
23
views
Bug or Missconfiguration - Segmentfault on PHP-FPM with chroot setup + nginx (split_path_info)
Hello Linux users and webmasters,
currently I try to setup a php fpm with an chroot configured in a pool.
It works fine with Nginx with normal setup, but when I try to use the split_path_info inside ...
0
votes
1
answer
720
views
curl cannot load localhost: "404 Not Found" answer
I am running Ubuntu 20.04,
and when I try to connect to localhost using curl with the command:
curl -v localhost
I get the result:
* Trying 127.0.0.1:80...
* TCP_NODELAY set
* Connected to localhost ...
2
votes
2
answers
2k
views
nginx location wildcard or inheritance for directories
location /slides/*/ {
autoindex on;
charset utf-8;
}
does not work. how would I open all subdirectories under /slides/ to allow autoindex?
0
votes
1
answer
34
views
How does it works the "HTTP 101 Protocols Switching" in a client server communication?
I'm developing a web site that is served by the web server NGINX installed on a Linux platform. One of the service provided by the web site is base on a WebSocket backend server.
To be more specific ...
0
votes
0
answers
48
views
How can I create a demo service to run python app directly with Uvicorn+Nginx rather than using Gunicorn?
Please let me know if we can create a same service as we can create for Gunicorn
[Unit]
Description=Gunicorn instance to serve MyApp
After=network.target
[Service]
User=<username>
Group=www-...
1
vote
1
answer
50
views
How can I delete all this in my nginx.d/default.conf file;
server {
server_name xxx.com;
location / {
client_max_body_size 200M;
proxy_pass http://127.0.0.1:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header ...
1
vote
1
answer
65
views
systemd syntax variations and differences
Upon getting this type of error:
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
...
1
vote
0
answers
321
views
How to make nginx access symbolic path without permission issue
I created a symbolic link path in nginx server side which reference to my documents directory
[user1@localhost nginx] pwd
/user/share/nginx
[user1@localhost nginx] sudo ln -s ~/Documents/nginx-sites/...
1
vote
1
answer
790
views
TCP Timeouts in Nginx
I am running about sixty webservers on a Proxmox Cluster (uses KVM). The VMs are running the most recent version of Debian 11. They use nginx, different versions of PHP-FPM and MariaDB. I follow a ...
0
votes
0
answers
27
views
All local virtual hosts are redirecting to another one - Nginx
Edit: My problem was a faulty nginx.conf file. This one worked for me:-
sudo gedit /etc/nginx/nginx.conf
# Generated by nginxconfig.io
# https://www.digitalocean.com/community/tools/nginx
user ...
0
votes
0
answers
348
views
Help with NGINX conf for reverse proxy for both WSS to ws and HTTPS to http, Debian 11, looping redirects
My current config for NGINX results in infinite loop of redirects to https, when I try to access index.html. Does someone have the correct way to do this?
The goal is to forward inbound requests on ...
1
vote
1
answer
64
views
web servers several instances with different config tmp and ports
Using systemd how to create several services of engine X with individual ports, conf and tmp files
as far i as i got i need to create copy /etc/nginx/nginx.conf nginx2.conf and nginx3.conf - there i ...
1
vote
1
answer
410
views
NginX - http and stream proxy on the same server
I want to ask you if there is a possibility to configure NginX as http proxy and stream proxy on the same NginX server? Or should it be splited on two machines, one as http proxy, another as stream ...
0
votes
0
answers
103
views
Using NGINX release, not building from source, how to use server_tokens?
I'm using the stable release of NGINX 1.22.0 without building from source, so I do not have access to the more_headers module. According to:
http://nginx.org/en/docs/http/ngx_http_core_module.html#...
0
votes
0
answers
143
views
nginx reverse proxy to nextcloud between 2 different (ubuntu) servers
Enthusiastic home user and perpetual student of Linux (Ubuntu).
Got a Raspberry Pi. Until recently, I had FTTC with UK Virgin Media. Was using NAT port forwarding 80 443 to make Pi available on my ...
0
votes
0
answers
165
views
CORS error in nginx server ubuntu 22.04
My friends and I are building a website on our nginx server, but on the prontend there were errors when accessing the API, which is also located on the same server.
Errors look like this:
As you ...
0
votes
0
answers
305
views
change mariadb pass on nginx proxy manager
I was able to run nginx proxy manager using podman from following code
podman run -d \
--name "mysql" --network npm_default --restart unless-stopped \
-e MYSQL_ROOT_PASSWORD:'npm' \
-e ...
0
votes
0
answers
49
views
socat not passing back response from EXEC'd WOL wrapper script to nginx reverse proxy
Background
I've got a jellyfin server. I used to run it on my little atom router/nas box, but the internal graphics card couldn't do transcoding fast enough. So now I've moved it to a box that has a ...
0
votes
2
answers
595
views
Proxying localhost to HTTPS using socat returns Connection refused first time
I'm trying to fetch a page from https://termbin.com/9hc2k using bash redirections and socat, especially using special file /dev/tcp/localhost/8080 to open a network connection.
# fetch.sh
# fetch ...
0
votes
0
answers
54
views
Why is Radicale posting an error despite the changes beeing written well (reverse proxy with nginx)?
I want to find out why error.log is posting an error
2022/07/27 09:01:47 [error] 7337#7337: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.111.1, server: ...
0
votes
2
answers
243
views
Preserve port in url (nginx)
I am trying to run nginx server to show some folders, so users could see theirs content and download files. But I want nginx to listen port say 80 inside docker container, but outside it will be say ...
0
votes
0
answers
21
views
Why does "nginx -g daemon off" command work well with "bash -c" but without it gives the error? [duplicate]
The command is: nginx -g daemon off
My current shell:
root@aws:~# echo $0
bash
root@aws:~# nginx -g daemon off
nginx: invalid option: "off"
root@aws:~# bash -c nginx -g daemon off
root@aws:~...
0
votes
0
answers
57
views
How can I forward my http/https request to 2 different upstream proxies based in the destilanation url?
Hi I am quite struggling to find a good solution to my problem. I have to forward http/https requests from my (Linux) server to 2 different proxy based on the destination URL.
I've tried different ...
0
votes
0
answers
693
views
nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "r3.o.lencr.org" in the certificate
I updated my router firmware and it ended up killing my webserver, so I reverted back to the old firmware in hopes that it would un**** itself. It didn't.
So now I'm battling an issue where I'm ...
1
vote
1
answer
162
views
What's the correct way to setup Certbot for an nginx server with several ports/services under one single domain?
Originally, I had NGINX configured for two services (Radicale and LMS) on two different ports. I did this in /etc/nginx/nginx.conf. Access to MYDOMAIN:8000 and :8009 and 3001 from the internet are ...
1
vote
1
answer
171
views
How is nginx able to serve a site in a directory which belongs to root, as well as all of its files?
A part of my /etc/nginx/nginx.conf
#user nobody;
user http;
worker_processes 1;
events {
worker_connections 1024;
}
#.......
One of my websites:
ls -al /var/web/...
0
votes
1
answer
440
views
Nginx reverse stream proxy for subdomains "curl: (52) Empty reply from server"
I'm trying to setup a reverse proxy to redirect tcp from subdomain.example.com to localhost:3000 using Nginx's ssl_preread_server_name module.
The host test.localhost is defined for testing purposes ...