nginx如何设置用户(user 属性)
运行提示:
nginx: [emerg] getpwnam("www") failed in /usr/local/nginx/conf/nginx.conf:1
www用户有,nginx.conf基本上就是默认的,用的是arm的板子
user www www;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
//
passwd文件:
root::0:0:root:/root:/bin/sh
bin::1:1:bin:/bin:/sbin/nologin
daemon::2:2:daemon:/sbin:/sbin/nologin
nobody:x:1000:1001:Linux User,,,:/home/nobody:/bin/sh
www:x:1001:1002:www,,,:/home/www:/sbin/nologin
/
group文件:
root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
zhl:x:1000:
nobody:x:1001:
www:x:1002:
相关阅读:
MyEclipse中新建一个文件夹不能自动同步到tomcat,新建文件却可以,为什么文件夹不行呢?
如何获得美国各所大学的招生数据?有没有可以调用的api?
vs2015切换固定状态按钮有什么用?
wtforms 表单表单验证异常,不知如何解决
Python用Py2exe打包脚本 找不到Win32api模块
mac版toad如何手动commit?
sqlserver2012 如何建立一个数据库的用户名让程序用odbc去连接?
有关邮件筛选器的程序管道
Jquery判断页面元素是否在浏览器的可视区域内
jquery如何判断3张图片都被点击过,并且是按顺序点击的
请问有没有跨平台的集群管理软件?
一个关于slice的问题
php关于可变类名的疑问
resin出现没响应的情况,有什么方法查看产生问题的原因?
停用硬件加速后,canvas渲染速度变快了?
大家怎样通过模板导出word
对已授权的微信用户,怎么能更换他的头像呢?
一个AJAX请求如何获取后端口多次返回的状态信息
标签怎么修改播放器按钮的样式
php 设计问题,我写了一个Config类,读取配置文件