Hey, when I run ‘./nginx -s reload’ or ‘./nginx -s stop’ i get
this:
nginx: [error] open() “/usr/local/nginx-1.4.3/logs/nginx.pid” failed
(2: No such file or directory)
Any ideas why it’s trying to open this file that doesn’t exist?
Hey, when I run ‘./nginx -s reload’ or ‘./nginx -s stop’ i get
this:
nginx: [error] open() “/usr/local/nginx-1.4.3/logs/nginx.pid” failed
(2: No such file or directory)
Any ideas why it’s trying to open this file that doesn’t exist?
Where have you configured your pid file? Are you using a custom build,
or a distributed package?
Hello!
On Fri, Jul 18, 2014 at 11:32:38PM +0100, Matthew Ngaha wrote:
Hey, when I run ‘./nginx -s reload’ or ‘./nginx -s stop’ i get this:
nginx: [error] open() “/usr/local/nginx-1.4.3/logs/nginx.pid” failed
(2: No such file or directory)Any ideas why it’s trying to open this file that doesn’t exist?
There are multiple possible reasons - e.g., this can happen
because you’ve changed the configuration file, or if you are
trying to stop wrong nginx.
In general, it’s good idea to use “kill” to control nginx on
unix-like systems (not the “nginx -s” which is mostly for Windows
and requires a configuration file to work). Use of “kill” allows
to explicitly specify PID of the master process (and/or to get one
from a pid file of your choice).
See here for details on how to control nginx using signals:
http://nginx.org/en/docs/control.html
–
Maxim D.
http://nginx.org/
I have two problems : Upgrading mysql and configurating my custom
404.html
page.
I wanted to install an admin page, but need to the consistency of mysql
and
php version, so I wanted upgrade mysql as the same version as PHP, and I
had
the following result:
Nginx failure and impossible to use port 81. My website stop to work.
I set Nginx on port 81 because I could not connect my VPS on Internet
for
updating and installing packages.
Here is my configuration :
Debian 6 wheezy (ok)
nginx (ok)
php5 (cgi and fmp not installed)
mysql (ok)
csf firewall (ok)
naxsi (installed but not working)
So I spent days on google without finding solutions, knowing I had
previously installed csf firewall, Meanwhile I wanted to change the
default
nginx 404 page to my custom 404.html page, my errors html files are in
the
root directory, that I had configure this default server file, but
still
does not work, and then I can’t stop nginx ( “nginx stop service.” )
The
nginx.pid is missing.
My website works and mysql too, but I’m stuck here.
Can you give me the solution ?
Any help will be appreciated.
Thank you.
-nginx.conf
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json
application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
include /etc/nginx/naxsi_core.rules;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
My default server conf file :
server {
listen 81; ## listen for ipv4; this line is default and
implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /var/www/;
index index.html index.htm index.php
error_page 404 /404.html;
location = /40x.html {
root /var/www/;
internal;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/;
}
#Make site accessible from http://www.site.com/
server_name site.com www.site.com;
access_log /var/log/nginx/site.access.log;
error_log /var/log/nginx/site.error.log;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
include /etc/nginx/naxsi.rules;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
# Only for nginx-naxsi used with nginx-naxsi-ui : process denied
requests
location /RequestDenied {
proxy_pass http://127.0.0.1:8081;
return 500;
}
# pass the PHP scripts to FastCGI server listening on
127.0.0.1:9000
#
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
# # NOTE: You should have “cgi.fix_pathinfo = 0;” in
php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
root@xxx:~# netstat -ntpul
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State
PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:*
LISTEN
2989/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN
3198/sshd
tcp 0 0 0.0.0.0:81 0.0.0.0:*
LISTEN
4647/nginx
tcp 0 0 127.0.0.1:6010 0.0.0.0:*
LISTEN
18881/0
tcp6 0 0 :::22 :::*
LISTEN
3198/sshd
tcp6 0 0 :::80 :::*
LISTEN
2266/apache2
tcp6 0 0 ::1:6010 :::*
LISTEN
18881/0
udp 0 0 0.0.0.0:36913 0.0.0.0:*
2299/avahi-daemon:
udp 0 0 xx.xx.x.xx:xxx 0.0.0.0:*
3139/ntpd
udp 0 0 xxx.xx.xxx.xxx:xxx 0.0.0.0:*
3139/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:*
3139/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:*
3139/ntpd
udp 0 0 0.0.0.0:5353 0.0.0.0:*
2299/avahi-daemon:
udp 0 0 0.0.0.0:1900 0.0.0.0:*
3303/minissdpd
udp6 0 0 :::49180 :::*
2299/avahi-daemon:
udp6 0 0 ::1:123 :::*
3139/ntpd
udp6 0 0 xx80::xxxx:xx:xxx::xxx :::*
3139/ntpd
udp6 0 0 :::123 :::*
3139/ntpd
udp6 0 0 :::5353 :::*
2299/avahi-daemon:
Hello!
On Mon, Nov 24, 2014 at 01:25:21PM -0500, xning9 wrote:
I have two problems : Upgrading mysql and configurating my custom 404.html
page.
Please don’t hijack unrelated threads.
Thank you.
–
Maxim D.
http://nginx.org/
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs