I am currently trying to set up my raspberry pi with nginx and have run into a couple of problems. I am not too experienced with this however I have used linux before and know my way around the command line somewhat. I am getting two problems when setting things up. After editing the nginx.conf file and restarting the nginx service I get the following error.
Restarting nginx: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2014/04/25 21:03:15 [warn] 2239#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2014/04/25 21:03:15 [emerg] 2239#0: "worker_processes" directive is duplicate in /etc/nginx/nginx.conf:30
nginx.
If I enter
sudo service nginx restart
I get the following:
Restarting nginx: nginx: [emerg] "worker_processes" directive is duplicate in /etc/nginx/nginx.conf:30
nginx.
My second problem occurs when creating the self signed ssl certificate.
I get the error
unknown option –days
to fix this I ended up switching the -days option and -nodes option like this:
sudo openssl req -new -x509 -days 365 -nodes -newkey rsa:2048 -out server.crt -keyout server.key
This seems to work however I have never done any of this so I am not sure if it is correct.
after setting up index.php and entering my ip in my browser I don't get anything. I'm not sure if its the error in the nginx.conf file causing this but I can't seem to get it working. Any pointers would be greatly appreciated!