# 403 error for one of my server blocks

**URL:** <https://www.ruby-forum.com/t/403-error-for-one-of-my-server-blocks/238466>\
**Category:** NGINX\
**Created:** [January 12, 2014, 5:05am UTC](https://www.ruby-forum.com/t/403-error-for-one-of-my-server-blocks/238466 "2014-01-12T05:05:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [January 12, 2014, 5:05am UTC](https://www.ruby-forum.com/t/403-error-for-one-of-my-server-blocks/238466/1 "2014-01-12T05:05:28Z")

</div>

Hi,

I installed nginx on an ubuntu server and then followed this tutorial  
(which  
I’ll quote from) to setup server blocks

> **[How To Configure Single and Multiple WordPress Site Settings with Nginx |...](https://www.digitalocean.com/community/tutorials/how-to-configure-single-and-multiple-wordpress-site-settings-with-nginx)**
>
> WordPress is a popular CMS (content management system). In this tutorial, you will configure NGINX for various types of WordPress installations, including mu…

.(I don’t do any of the WordPress config in that article). It uses a  
common.conf that the server blocks inherit from.

In one of my server blocks, I setup a basic index.html page and set my  
domain name for the server name in the server block file.

In the directory for my other server block, I setup a node app. That’s  
the  
one where I’m getting the 403 error.

Anyone know why this might be happening and how I might debug and/or fix  
it?

server block

server {  
# URL: Correct way to redirect URL’s  
server\_name [demo.com](http://demo.com);  
rewrite ^/(.\*)$ [http://www.demo.com/$1](http://www.demo.com/$1) permanent;  
}  
server {  
server\_name [www.demo.com](http://www.demo.com);  
root /home/demouser/sitedir;  
access\_log /var/log/nginx/www.demo.com.access.log;  
error\_log /var/log/nginx/www.demo.com.error.log;  
include global/common.conf;  
}

common.conf

# Global configuration file.

# ESSENTIAL : Configure Nginx Listening Port

listen 80;

# ESSENTIAL : Default file to serve. If the first file isn’t found,

index index.php index.html index.htm;

# ESSENTIAL : no favicon logs

location = /favicon.ico {  
log\_not\_found off;  
access\_log off;  
}

# ESSENTIAL : robots.txt

location = /robots.txt {  
allow all;  
log\_not\_found off;  
access\_log off;  
}

# ESSENTIAL : Configure 404 Pages

error\_page 404 /404.html;

# ESSENTIAL : Configure 50x Pages

error\_page 500 502 503 504 /50x.html;  
location = /50x.html {  
root /usr/share/nginx/www;  
}

# SECURITY : Deny all attempts to access hidden files .abcde

location ~ /. {  
deny all;  
}

# PERFORMANCE : Set expires headers for static files and turn off

logging.  
location ~\*  
^.+.(js|css|swf|xml|txt|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$  
{  
access\_log off; log\_not\_found off; expires 30d;  
}

Posted at Nginx Forum:

> **[403 error for one of my server blocks](https://forum.nginx.org/read.php?2,246285,246285#msg-246285)**
>
> Hi, I installed nginx on an ubuntu server and then followed this tutorial (which I'll quote from) to setup server blocks https://digitalocean.com/community/articles/how-to-configure-single-and-multiple-wordpress-site-settings-with-nginx .(I don't do...

---

<div class="post-metadata">

**Author:** ![nginxmike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2bfe46/32.png) [@nginxmike](https://www.ruby-forum.com/u/nginxmike)\
**Post date:** [January 12, 2014, 10:44am UTC](https://www.ruby-forum.com/t/403-error-for-one-of-my-server-blocks/238466/2 "2014-01-12T10:44:49Z")

</div>

On Sat, Jan 11, 2014 at 11:04:35PM -0500, nginxmike wrote:

Hi there,

> In the directory for my other server block, I setup a node app. That’s the  
> one where I’m getting the 403 error.
> 
> Anyone know why this might be happening and how I might debug and/or fix  
> it?

What http request do you make that does not give the response that you  
want?

What does the error log say about that request?

## f

Francis D. removed\_email\_address@domain.invalid
