我尝试启动我的Nginx,并在下面的命令后得到下面的错误:
sudo /etc/init.d/nginx start Starting nginx: start-stop-daemon: unable to start /usr/local/nginx (Permission denied)
我的configuration文件是:
user www-data www-data; worker_processes 1; events { worker_connections 2048; } http { include mime.types; default_type application/octet-stream; access_log off sendfile on; tcp_nopush on; tcp_nodelay off; keepalive_timeout 10; gzip on; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } include /usr/local/nginx/sites-enabled/*; }
尝试:
chmod +x /usr/local/nginx