Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Nginx - invalid variable + directive is not allowed here

$
0
0
sudo journalctl -xn

-- Logs begin at sob 2016-07-09 21:28:50 CEST, end at pon 2016-07-11 23:41:50 CEST. --
lip 11 23:40:13 Foto nginx[4680]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
lip 11 23:40:13 Foto nginx[4680]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
lip 11 23:40:14 Foto nginx[4680]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

sudo systemctl status nginx.service
(...)
Process: 4423 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=1/FAILURE)
(...)

I fix "listen 80" (and pid?) /http://stackoverflow.com/questions/14972792/nginx-nginx-emerg-bind-to-80-failed-98-address-already-in-use

by:
listen 80;
listen [::]:80 ipv6only=on default_server;


sudo systemctl status nginx

nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: active (running) since wto 2016-07-12 00:01:29 CEST; 48min ago
Docs: man:nginx(8)
Process: 4888 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 4894 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 4893 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 4897 (nginx)
CGroup: /system.slice/nginx.service
├─4897 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─4898 nginx: worker process



Error log (full)
http://pastebin.com/g0ZMqd4m

last lines
2016/07/12 00:02:33 [error] 4898#4898: *1 open() "/usr/share/nginx/html404" failed (2: No such file or directory), client: 31.183.115.252, server: localhost, request: "GET /info.php HTTP/1.1", host: "mysite.com"
2016/07/12 00:02:39 [error] 4898#4898: *1 open() "/usr/share/nginx/html404" failed (2: No such file or directory), client: 31.183.115.252, server: localhost, request: "GET / HTTP/1.1", host: "mysite.com"
2016/07/12 00:02:54 [error] 4898#4898: *3 open() "/usr/share/nginx/html404" failed (2: No such file or directory), client: 31.183.115.252, server: localhost, request: "GET / HTTP/1.1", host: "www.mysite.com"

Yes I don't have /usr/share/nginx/html404
Google
https://www.queryxchange.com/q/1_767809/redirect-to-home-myuser-public-html/


But ngnix can't see

location / {
root /var/www/html; ?

*i try debug tomorrrow

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>