1

I use Nginx at my company and am new at it.

I'm just wondering if anyone had issues where the Nginx did NOT have enough privileges on Windows 10 NOT Ubuntu, but Windows 10, to create files and directories within the Nginx folder. In my Nginx.conf, the user "nobody" and "pid" line are commented out so I know that Nginx is NOT using a user that does NOT belong to the Admin group. Even the "root" user, I did not find it in my conf file.

Sometimes I can't even manually open up that Nginx folder and this issue is preventing our Nginx windows service from running.

Any suggestion for Windows 10 (Not Ubuntu) users would help; hopefully you've been there before.

UPDATES

Here's the error I get:

[error] 12212#14724: *1 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "POST /some/folder/create?v=1.8 HTTP/1.1", upstream: "http://127.0.0.1:8081/someFolder/items/create?v=1.8", host: "localhost"

pelican
  • 5,846
  • 9
  • 43
  • 67
  • What happens when you run nginx with a real user (create an account on windows) and then make the root path somewhere public, like `C:\www` – peixotorms Feb 23 '16 at 23:29
  • I tried that and got same error; I'll update this post if I find anything, thanks peixotorms – pelican Feb 24 '16 at 18:33
  • Set the user explicitly on your nginx.conf. Can you see which user is running nginx under your taskmanager? – peixotorms Feb 24 '16 at 19:06
  • I just checked and the user is SYSTEM and this user has Full Control permissions on the parent folder within which Nginx is located – pelican Feb 24 '16 at 19:35
  • Yeah even adding 'user system administrators' to my Nginx.conf doesn't cut it either and Nginx is running as SYSTEM - got that from TaskManager as you suggested – pelican Feb 24 '16 at 19:49
  • It just occurred to me... do you have anything else using port 80? And also, what language are you using to access files in that folder? Nginx might be ok, but maybe php or other isn't. Please share some sample code that's not working. – peixotorms Feb 24 '16 at 21:50
  • We're using Java not PHP and I checked that Skype wasn't using port 80 so port 80 is free; I don't have much code to share and am NOT allowed since it's my company's code; I just run a .bat file that kick starts Nginx via a Windows service. Looking at the error log, it seems that the issue is that service can't create certain files and folders within the Nginx folder; it's a permission issue I think - I updated question above with error from log file, please take a look - Oh that error above is different now because I manually created those folders that Nginx coulnd't create – pelican Feb 24 '16 at 22:02
  • Java you say? Is Jetty, Tomcat or whatever properly configured and listening on port 8081? Do a netstat and check if java is started and listening on the correct port. Your error suggests that your upstream block on nginx.conf, is pointing to a program that should be running on port 8081... however, this kind of error usually happens when nothing is waiting on that port. Your `upstream server software` is the one that might not have the right permissions, because nginx just acts as a proxy. Nginx will not create any directories or files. That is to be done by java (in your case). – peixotorms Feb 24 '16 at 23:56
  • However, looks like java is not listening to nginx requests. – peixotorms Feb 24 '16 at 23:59
  • netstat -np tcp | find "80" TCP 10.00.59.29:51575 288.85.48.20:80 ESTABLISHED TCP 10.00.59.29:51685 21.97.204.18:80 ESTABLISHED - However running same command for port 8081 returns nothing so you're right that nothing is listening on that port – pelican Feb 25 '16 at 14:36
  • So there you go, you have to have java running (service) and listening on port 8081 (the one you specified on the nginx upstream block) for it to work. Nginx won't start java for you, it just talks to it. Here you go, some info: https://www.nginx.com/resources/wiki/start/topics/examples/javaservers/ – peixotorms Feb 25 '16 at 20:28
  • Thanks we actually fixed this issue; it had nothing to do with windows permissions; basically there was a configuration that blocked certain folders from being created; changing that configuration allowed the folders to be created and the rest of my work to continue on; thanks again so much for your assistance and help – pelican Feb 26 '16 at 21:38
  • In that case, I would suggest deleting your question, since it doesn't add anything to the community. – peixotorms Feb 27 '16 at 00:07
  • Another developer might have a similar problem and think that it's due to windows permissions and then read our back and forth dialogue and realize it most likely isn't due to windows 10 permissions so I would politely disagree that this is indeed giving value to the community. – pelican Feb 29 '16 at 16:19

0 Answers0