Add new server to nginx


itimpi

Recommended Posts

Since we now have the nginx web server installed as default in unRAID, I was wondering if I could add some additional web sites of my own to it.   At first glance it looked as all I would have to do is to drop some additional server configuration files into the /etc/nginx/conf.d folder.  I tried adding a web server along the lines of:

server {
	listen 8008;
	server_name "EBOOKS";
	access_log /var/log/nginx/ebooks.access.log;
	error_log /var/log/nginx/ebooks.error.log;
	location / {
		root /mnt/user/EBOOKS;
		index index.html index.htm;
	auth_basic		off;
	}
}

When I do this and restart the nginx daemon I find that the port is now recognised, but I get a "403 Forbidden" error trying to access the index.html file.   I can also add an htpasswd generated file to try and use basic authentication and then I get challenged for a username/passwd as expected, but still do not get into my web site.

 

Anyone have any idea why this is happening?    Is there something else I am going to have to do to get my own servers added to nginx or is it something that is not going to be very easy without upsetting the unRAID GUI?  Ideally I would like SSL access, but for this particular purpose HTTP would be fine.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.