Questions tagged [nginx]

13189 questions
0

votes
0

answer
3

Views

Redirect loop while logged in to jaspersoft

I have installed jasperserver on tomcat 8 on Windows. I want to let user access this via NGinx as reverse proxy. I have installed nginx and created a serverfile for jaspersoft. Everything looks fine when I access the URL of jaspersoft. But as soon as I am logged in I am being redirected from 'https:...
Sander Horst
1

votes
1

answer
1.5k

Views

Nginx Rule to Block Specific URL

Need some help in writing a rule to block the following request The url in question is: www.somesite.com/catalogsearch/result/?q=downloader I have tried the following, but this does not work location ^~ catalogsearch/result/?q=downloader { deny all; } I 'think' the because the ? question mark is inc...
user1517598
0

votes
0

answer
12

Views

Replacing character with a string in Nginx

Is there a way I can replace # with '?somecharacter' ? What i'm trying to do is convert my URL from https://localhost/#afljkdhslfjdsaf to something linke https://localhost/?var=afljkdhslfjdsaf. While i know how to access query paramerts inside nginx block i've not idea how to capture the # and repla...
Ritesh Chauhan
1

votes
2

answer
455

Views

kubernetes not creating the ELB for ingress-nginx controller

I am trying to set up ingress-nginx-controller with type as LoadBalancer using this guide for the configuration. Couple of issues I'm observing - issue#1) It does not create and deploy a ELB onto the AWS. issue#2) The External-IP status is showing as pending for ever. $ kubectl get services -...
tanmoy
1

votes
1

answer
27

Views

How to forward traffic from domain in route53 to a pod using nginx ingress?

I deployed grafana using helm and now it is running in pod. I can access it if I proxy port 3000 to my laptop. Im trying to point a domain grafana.something.com to that pod so I can access it externally. I have a domain in route53 that I can attach to a loadbalancer (Application Load Balancer, Net...
ag53
0

votes
1

answer
50

Views

Redirecting from https to http?

Strange problem here. I use FullCalendar to initiate an ajax request to an endpoint on my server. Endpoint is: https://my_website/events/?start=2019-03-31&end=2019-05-12&_=1555698739056 Note that it is explicitly https. However, when I initiate a request (that is, when Fullcalendar initiates a requ...
WillardSolutions
0

votes
0

answer
4

Views

502 Bad Gateway with pgadmin4 behind nginx?

I have an api running in docker with: nginx nodejs api postgresql pgadmin4 certbot When I try to add an endpoint for pgadmin so I can work with the database, I get a 502 bad gateway regardless how I'm setting up the ports for proxy_pass or in docker-compose for the actual container for pgadmin. dock...
SudoGaron
0

votes
0

answer
74

Views

Nginx hanging on audio file request

I'm having the most bizarre issue with nginx. After upgrading from 1.6.3 to 1.12.2 on RHEL 7.2, requests for audio files are just hanging: Connecting to mydomain [...] ... connected. HTTP request sent, awaiting response... In my nginx access.log, I'm seeing a 200 status: 'GET /media/Example.mp3 HTTP...
Jacob Brown
0

votes
1

answer
34

Views

Set up Laravel project to work with multiple domain names

I have successfully configured multiple domains to point to my Laravel 5.1 project VirtualDocumentRoot '/Users/Sites/project/public' ServerName app.com UseCanonicalName Off VirtualDocumentRoot '/Users/Sites/project/public' ServerName app2.com UseCanonicalName Off VirtualDocumentRoot '/Users/Sites/p...
kyo
0

votes
0

answer
3

Views

Rails production as daemon -d not working with Nginx

When I start rails server -b 127.0.0.1 -p 3000 -e production all is working When start with daemon option rails server -b 127.0.0.1 -p 3000 -e production -d It writes than something wrong (red window on rails website) log/production.log is empty Nginx error.log (domain changed to site.ru) - not only...
user1938361
1

votes
2

answer
92

Views

Passenger and rbenv issue - incompatible library version

Lately I moved from RVM to Rbenv. I run a bunch of different rails applications (each has a different ruby version) with passenger and nginx. However, I get an error for two applications when trying to load them: /user_folder/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:5...
Ariel Scherman
0

votes
0

answer
4

Views

Unable to run my django&bootstrap site with Let's Encrypt on DO Ubuntu 18.04 with nginx and gunicorn

I am trying to launch a django website and I want to install and make sure https connection works with let's encrypt for my site. I followed DigitalOcean 'How To Secure Nginx with Let's Encrypt on Ubuntu 18.04' tutorial on https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let...
codelearner
0

votes
0

answer
18

Views

Why does nginx return 403 on my PHP file download?

I use nginx 1.14.1 with PHP and I have problems with a call that should result in a file download. The PHP application produces a response with status code 200 and the file contents are dumped in the body, but from nginx I get the following answer (head) HTTP/2 403 server: nginx/1.14.1 date: Tue, 2...
smichaelsen
0

votes
1

answer
18

Views

Nginx Redirect to EC2 Instance

I had angular (version: 7) site which was deployed on S3 bucket, but for SEO purposes, recently I integrated Angular Universal. Now I moved site/frontend from S3 bucket to EC2 instance. I am trying to deploy my angular universal application on Nginx (version: nginx/1.14.1) on my EC2 instance (CentO...
Junaid
1

votes
3

answer
194

Views

Django use 'python manage.py' runserver instead Gunicorn

I have a django project hosted on an amazon ec2 linux instance. For run my app also when section is close i use gunicorn but i experience some errors and degradation in perfonrmances. When i run command: python manage.py runserver from terminal all works great but when section is close app does not...
AleMal
1

votes
2

answer
226

Views

Nginx config invalid parameter even though it is in documentation

I am tryin to run nginx latest version with the following configuration, but I get nginx: [emerg] invalid parameter 'route=bloomberg' in /etc/nginx/nginx.conf:13 docker run --rm -ti -v root_to_local_nginx_directory:/etc/nginx:ro -p 3080:80 --name=mynginx --entrypoint nginx nginx # nginx.conf file...
Ryan
5

votes
4

answer
169

Views

How can I index files only from specific folder of my public/ - Nginx?

I have 2 txt files that I placed at /home/forge/laravel58/public/files; I want to index those 2 txt files when I goto my site/files I've tried location /files { #auth_basic 'Restricted'; #auth_basic_user_file /home/forge/laravel58/.htpasswd; alias /home/forge/laravel58/public/files; autoindex on; }...
kyo
0

votes
1

answer
8

Views

when proxying aiohttp server via nginx how do I specify other static files properly?

I have something like this which is roughly (minus extraneous html block wrappers) straight from aiohttp docs. server { listen 8099; client_max_body_size 4G; location /static/* { # path for static files root /var/www/pkm/static/; } location / { proxy_set_header Host $http_host; proxy_set_header X-F...
Samantha Atkins
0

votes
0

answer
6

Views

How to write Nginx location block

I am a Nginx noob. I am trying to execute the location block which matches the general condition in all the cases but use the /account condition for for url matching that. So for request www.abc.com, www.abc.com/var1, www.abc.com/var2/var3 I want the first block to be execute but for request like ww...
Steve_Greenwood
1

votes
1

answer
260

Views

nginx rewrite part of url with ? mark

I'm serving a website with nginx as a proxy for apache. I have a problem with rewrite module. http://example.com/foo/bar/url?someparam=1&otherparam=2 I need to rewrite from /foo/bar/url?someparam=1&otherparam=2 to /foo/bar/url2?someparam=1&otherparam=2 I found it problematic, since it's not /foo/...
Ivan Nikolaev
1

votes
0

answer
606

Views

kevent() reported about an closed connection error

we are using FreeBSD, nginx, php-fpm in our server for php (yii) application. Sometimes kevent() reported about an closed connection (54: Connection reset by peer) while reading response header from upstream... occured in server log file and website response reach time out. Service php-fpm restart...
jamilaghasiyev
1

votes
0

answer
374

Views

Rails + Unicorn + Nginx error (504 Gateway timeout)

Am struggling to resolve '504 gateway timeout' issue on my rails website on Digitalocean. I started facing this error after I reset my root password for DO droplet. Please see the unicorn.log below from /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `requir...
HighOnRails
1

votes
1

answer
507

Views

nginx: [emerg] unknown directive “absolute_redirect”

I have the following config: ... server { expires off; absolute_redirect off; listen 8080; server_name localhost; # listen 80 default_server; # listen [::]:80 default_server ipv6only=on; # listen 443 ssl; client_body_timeout 36s; client_header_timeout 36s; keepalive_timeout 36s; send_timeout...
Bizon4ik
1

votes
0

answer
25

Views

XHR request changes response based on file extension

I have a binary file that contains an Uint8 array [0,1,2,3,4,5]. If I name it test.txt and load it everything is fine. However if I change its extension name to test.bpg the loaded data is [1,4]. What could make this happen? It doesn't happen when I run the file on local host (note only firefox will...
YAHsaves
1

votes
0

answer
83

Views

Redirect to specific port

I have a server where the web server is running on 1150 port and other services on few other ports like 1151, 1152 etc. Right now user has to add port in URL to access the web server. I want to redirect: abc.example.com abc.example.com:1150 http://abc.example.com https://abc.example.com http://abc....
Gaurav
1

votes
0

answer
338

Views

Rewrite URLs on Laravel Homestead

I'm making a web game. The backend is Lumen and the frontend is a single page application. I want to make a use of JavaScript History API, so all URIs (except for actual file or directory paths) should point to the same backend script. I know how to do it on Apache, but my local server is Laravel Ho...
Robo Robok
1

votes
0

answer
56

Views

Symfony does not read the base path propely after url rewrite

I've rewritten all urls from /api/(.*)$ to /api/public/index.php/$1 using this nginx configuration: location /api/ { try_files $uri @rewriteindex; } location @rewriteindex { rewrite ^/api/(.*)$ /api/public/index.php/$1 last; } location ~ ^/api/public/index\.php(/|$) { fastcgi_pass unix:/var/run/php-...
P. Danielski
1

votes
1

answer
395

Views

Cannot send email using django and nginx(gunicorn) on digital ocean droplet

I deployed a website using django + nginx + gunicorn on a ubuntu droplet. And I use the email function of django. However, every time I tried to send email, I got a 502 error in my website. And my nginx error log is: [error] 24933#24933: *30944 upstream prematurely closed connection while reading re...
Owen
1

votes
1

answer
2.3k

Views

My website is getting Corrupted Content Error in firefox on login

I have a website that is getting corrupted content error when logging into a user account. This error occurs in Firefox. It only occurs when you log into with a clean cache. After you log in once, you get that error, but you get skip past it. Then if you log out, and log back in again, you won't get...
user904542
1

votes
1

answer
1k

Views

Laravel Valet sites connection refused on port 80

Ever since Chrome and Safari started forcing HTTPS redirection on the .dev TLD I've been getting issues connecting to my Laravel Valet sites. Without knowing that Chrome and Safari had done this, I updated Valet to from 1.2 and not thinking to check in Firefox first (doh! 😖). I've installed the l...
Ben
1

votes
0

answer
493

Views

NGINX web-socket proxy for tcp

I am new to Nginx. I am able to achieve http proxy with following config: user nginx; events { worker_connections 5000; } http { upstream backends { server 127.0.0.1:8083; server 172.16.0.16:8083; } server { listen 12345; location / { proxy_pass http://backends; } } } How to achieve similar pr...
enator
1

votes
2

answer
595

Views

How to use verified certificate to set telegram bot Webhook?

I have verified ssl certificate (got it when bought hosting). It consist of four parts: 1. private key, 2. certificate, 3. root sertificate, 4. intermediate certificate. I made two files .key(private), .crt(certificate, intermediate, root) and confugure nginx. Everything good, my domain shows https...
Alexander Ostapenko
1

votes
0

answer
382

Views

nginx docker-compose issues mongo with node angular 5 on Windows

I have the following issue, when trying to create a user on the mongo container I am getting the below error. when not using docker and not using the mongo container, but the mongo installed on my harddisk, the user is created with no issues. I have very limited experience/knowledge with nginx and...
oudekaas
1

votes
0

answer
537

Views

NGINX SSL Too Many Redirects?

Environment Ubuntu 16.04 NGINX Light WordPress Configuration Domain name has been changed to example.com for this question. If I bypass port 443, I get the default NGINX landing page and not my WordPress site. # SSL configuration server { # Ports to listen on, uncomment one. listen 443 ssl http2; li...
DevByMike
1

votes
1

answer
79

Views

nginx location block serving two request paths, one needs an extra header

I have a single location block with many configurations, which acts as a proxy cache for multiple APIs. One of the APIs requires one additional config: proxy_set_header Content-type ''; I can't seem to put an if statement anywhere and am aware that if statements. in general and especially in locati...
halfpastjohn
1

votes
1

answer
2.1k

Views

how to make my own MPEG-DASH server?

I have already used the ffmpeg and mp4box to get the necessary file,just like the guild Making Your Own Simple MPEG-DASH Server.Then I put all the files include the MPD and the dash segments into my http server folder(nginx I used,the folder is **/wwwroot/default/). But I can not play my video via...
renkang chen
1

votes
1

answer
507

Views

NGINX vs. Apache? What to choose when deploying react

I am new to reactjs. I created a basic react app using create-react-app boilerplate. I prepared the build by running the command npm run build. Now I want to host the build folder. Which is better and why. Please let me know if any better and easy option available as I am new to this.
DadyByte
1

votes
0

answer
464

Views

Nginx displaying HTML code in browser when running .PHP file

When I run this code In a .php file in my local php server (on os x terminal 'php -S localhost:9000'), it displays correctly only the output of the PHP code. But when I run it through NGINX on a Digital Ocean server, it displays the correct output of the PHP code, but it also displays the html tags...
Lucca Portes
1

votes
1

answer
174

Views

Express Routes serving up as expected on local machine. But not when on Nginx

Routes serving up as expected on my local machine. But not serving up /public or /api routes. I've setup a serverblock for node.mydomain.com, installed a node app, and am getting 404 errors for all the routes express is supposed to be serving (static and api). node.mydomain.com => /public/index.htm...
Alice
1

votes
1

answer
86

Views

Different nginx config for different environments

I have a Rails app hosted in two different servers (both with dokku) for production and staging environments. The first one is hosted in www.mywebsite.com.br and the second one in www.staging.mywebsite.com.br. We use a SSL certificate in production so I wrote return 301 https://www.mywebsite.com.br...
ianobraczka

View additional questions