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.

According to NetCraft, it currently is the third most used web server, with 10% market share.

Official web site

719 questions
129
votes
1 answer

Does nginx support comment blocks in configuration?

I have here an nginx config. I need to comment out blocks in it: ...things I want... ...things I don't want... ...things I want... The things are 30-50 lines long, and I won't backup and delete them. I also don't want write #s to the beginning of…
peterh
  • 9,488
  • 16
  • 59
  • 88
61
votes
2 answers

Do I Need to Restart Nginx if I Renew My Security Certificate(s)?

So I'm setting up an nginx server with SSL enabled with a server definition something like: server { listen :80; listen [::]:80; server_name example.org; root /foo/bar; ssl on; ssl_certificate /path/to/public/certificate; …
Haravikk
  • 1,021
  • 2
  • 13
  • 19
51
votes
3 answers

Make Nginx follow symlinks

Nginx does not follow symbolic links. I get a 404 error. In my directory, I have this link: lrwxrwxrwx 1 root root 48 Sep 23 08:52 modules -> /path/to/dir/ but the files stored in /path/to/dir aren't found.
stecog
  • 2,221
  • 10
  • 29
  • 39
45
votes
4 answers

Why does nginx starts process as root?

I have installed nginx server. I've just checked listening ports and saw the following: $ sudo lsof -nP -i | grep LISTEN sshd 614 root 3u IPv4 7712 0t0 TCP *:22 (LISTEN) nginx 822 root 7u IPv4 8745 0t0 TCP…
Erik
  • 1,687
  • 3
  • 13
  • 11
31
votes
9 answers

Problems to install nginx-full on debian 8

I have some problems to install nginx pkg (nginx-full) on debian jessie # apt-get install nginx-full Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: …
gnomex
  • 313
  • 1
  • 3
  • 5
25
votes
2 answers

How to configure NGINX as a reverse proxy for different port numbers?

I have NGINX configured like this as a reverse proxy for http requests: server { listen 80; server_name 203.0.113.2; proxy_set_header X-Real-IP $remote_addr; # pass on real client IP location / { proxy_pass…
Ole
  • 687
  • 1
  • 10
  • 20
25
votes
1 answer

Proper syntax for ansible symlink

What is the proper syntax for creating symlinks using ansible? I'm creating a Vagrant virtual environment and running ansible as my provisioner. Everything works fine up until I try to symlink to my site nginx configuration file from sites-enabled.…
jeanpier_re
  • 405
  • 2
  • 5
  • 10
21
votes
1 answer

Nginx reverse proxy redirection

I am using nginx as a reverse proxy and when I login in my web interface I am redirected to the proxied URL. I would like to avoid it and always keep the "server_name" as the URL. Is it possible? This is my /etc/nginx/conf.d/my_app.conf: server {…
tonio94
  • 321
  • 1
  • 5
  • 8
20
votes
5 answers

start nginx on boot with systemd

I just installed nginx 1.9 on a Debian 8 server. nginx is working fine, when I tell it to run, but it won't seem to load nginx automatically on boot. I have tried numerous init scripts recommended on the internet, but nothing has worked yet. So now…
j0h
  • 3,467
  • 8
  • 27
  • 36
20
votes
5 answers

Unable to Pull EPEL repository Metadata

Installing Nginx on Scientific Linux according this documentation fails: [vagrant@localhost ~]$ sudo su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epe l/6/x86_64/epel-release-6-8.noarch.rpm' Retrieving…
030
  • 1,527
  • 2
  • 17
  • 33
18
votes
2 answers

Proxy (nginx) shows a Bad gateway error

I have a service (docker registry) that runs on port 5000, I have installed nginx to redirect http request from 8080 to 5000. If I make a curl to localhost:5000 it works, but when I make a curl to localhost:8080 I get a Bad gateway error. nginx…
stecog
  • 2,221
  • 10
  • 29
  • 39
14
votes
1 answer

The correct way of implementing SSL on localhost

Could anyone suggest a modern way of generating self-signed certificates to be implemented on localhost, which would be accepted by Chrome and Mozilla? I tried the openssl generation, however Mozilla complains that the issuer is untrusted. Centos 7,…
Tarlan Mammadzada
  • 245
  • 1
  • 2
  • 8
14
votes
2 answers

Nginx Add Secure Flag to Cookies from proxied server

Mozilla just released a new tool to check your website configuration. observatory.mozilla.org But the scan is complaining about Cookies (-10 points): Session cookie set without the Secure flag ... Unfortunately the service running behind my nginx…
ST-DDT
  • 453
  • 1
  • 5
  • 12
14
votes
4 answers

How to uninstall nginx (installed from source)?

I want to switch from a development version to a stable one. I installed nginx from source with: ./configure make sudo make install I tried sudo make uninstall but it doesn't work. How can I uninstall nginx?
13
votes
3 answers

Nginx says open() "/etc/nginx/conf.d/foo.conf" failed (13: Permission denied)

Here is what I have in ls -al /etc/nginx: total 52 drwxr-xr-x. 4 root root 4096 Jul 28 04:16 . drwxr-xr-x. 78 root root 8192 Jul 28 03:37 .. drwxr-xr-x. 2 root root 26 Jul 28 03:55 conf.d drwxr-xr-x. 2 root root 6 May 10 09:21…
yegor256
  • 1,871
  • 3
  • 15
  • 12
1
2 3
47 48