{"id":9330,"date":"2022-03-29T19:41:47","date_gmt":"2022-03-29T14:11:47","guid":{"rendered":"https:\/\/www.skynats.com\/?p=9330"},"modified":"2025-03-12T15:51:39","modified_gmt":"2025-03-12T10:21:39","slug":"digitalocean-403-forbidden-nginx","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/","title":{"rendered":"DigitalOcean 403 Forbidden NGINX Error"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-how-to-fix-digitalocean-403-forbidden-nginx-error\">How to fix Digitalocean 403 forbidden nginx error?<\/h2>\n\n\n\n<p>When a client attempts to access a part of the webserver with insufficient permissions, the Nginx 403 Forbidden error is generated and displayed to the user.<\/p>\n\n\n\n<p><strong>Let&#8217;s take a look at the ways our Technical Support team took to fix<\/strong> <strong>it:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Check to see if nginx is up and running.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status nginx<\/code><\/pre>\n\n\n\n<p>You must see something like this if nginx is up and running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx.service - The nginx HTTP Server\n   Loaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)\n   Active: active (running) since Tue 2019-11-19 09:37:46 UTC; 2 days ago\n     Docs: https:\/\/httpd.nginx.org\/docs\/2.4\/<\/code><\/pre>\n\n\n\n<p>If nginx is not running, the output will be as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx.service - The nginx HTTP Server Loaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled) Active: inactive (dead) since Fri 2019-11-22 08:41:01 UTC; 39s ago Docs: https:\/\/httpd.nginx.org\/docs\/2.4\/<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>If nginx isn&#8217;t already running, you can start it by typing:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start nginx<\/code><\/pre>\n\n\n\n<p>Then double-check the status to ensure that nginx is still running.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If nginx failed to start after a reboot, you can allow it so that it starts the next time you reboot:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable nginx<\/code><\/pre>\n\n\n\n<p>Check your nginx config syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx -t<\/code><\/pre>\n\n\n\n<p>If you receive an error, you must first resolve the issue before restarting nginx:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart nginx<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>If you get <em>Syntax OK<\/em> when running <em>nginx -t<\/em>, your configuration is accurate, so verify your error logs:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>tail -f \/var\/log\/nginx\/error.log<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Examine the file and folder permissions in your document root:<\/li><\/ul>\n\n\n\n<p>Consider the user which your nginx service is running as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps auxf | grep nginx<\/code><\/pre>\n\n\n\n<p>If you&#8217;re using Ubuntu, the user you must be www-data, so ensure that your files and folders are purchased by that user so that nginx can read and write to them:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R www-data:www-data \/var\/www\/yourdomain.com<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Then look to see if nginx is using the default ports:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>netstat -plant | grep '80\\|443'<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>At last, confirm if ufw enables TCP connections on port 80 and 443:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw status<\/code><\/pre>\n\n\n\n<p><strong>Other troubles with the server:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The Index File is Incorrect<\/li><\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>Permissions have been set incorrectly.<\/li><\/ol>\n\n\n\n<p><strong>Error 403: Client-Side Cause<\/strong><\/p>\n\n\n\n<p>As previously stated, the 403 error can also be caused by the user rather than the server. Undertake the basic operations on the client side to fix such problems.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Make sure you are attempting to access the target web location<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Clear the cache in your browser.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Ensure that you can access the web resource through the firewall or proxy.<\/li><\/ul>\n\n\n\n<p>Are you looking for an answer to another query? <a href=\"https:\/\/www.skynats.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\">Contact<\/a> our technical support team.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to fix Digitalocean 403 forbidden nginx error? When a client attempts to access a part of the webserver with insufficient permissions, the Nginx 403 Forbidden error is generated and displayed to the user. Let&#8217;s take a look at the ways our Technical Support team took to fix it: Check to see if nginx is [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[568],"class_list":["post-9330","post","type-post","status-publish","format-standard","hentry","category-blog","tag-403-forbidden-error"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>DigitalOcean 403 Forbidden NGINX Error | Skynats<\/title>\n<meta name=\"description\" content=\"When attempts to access a part of the webserver with insufficient permissions, Nginx 403 Forbidden error is generated. Here is the solution.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DigitalOcean 403 Forbidden NGINX Error\" \/>\n<meta property=\"og:description\" content=\"When attempts to access a part of the webserver with insufficient permissions, Nginx 403 Forbidden error is generated. Here is the solution.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Server Management Services | Cloud Management | Skynats\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/skynats\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-29T14:11:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-12T10:21:39+00:00\" \/>\n<meta name=\"author\" content=\"Arjun N\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:site\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arjun N\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/\"},\"author\":{\"name\":\"Arjun N\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/2428d280a8b32a1fbd909b1411e32fb7\"},\"headline\":\"DigitalOcean 403 Forbidden NGINX Error\",\"datePublished\":\"2022-03-29T14:11:47+00:00\",\"dateModified\":\"2025-03-12T10:21:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/\"},\"wordCount\":329,\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"keywords\":[\"403 forbidden error\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/\",\"name\":\"DigitalOcean 403 Forbidden NGINX Error | Skynats\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-03-29T14:11:47+00:00\",\"dateModified\":\"2025-03-12T10:21:39+00:00\",\"description\":\"When attempts to access a part of the webserver with insufficient permissions, Nginx 403 Forbidden error is generated. Here is the solution.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/digitalocean-403-forbidden-nginx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DigitalOcean 403 Forbidden NGINX Error\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"name\":\"Server Management Services | Cloud Management | Skynats\",\"description\":\"Server Management and Cloud Management\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\",\"name\":\"Skynats Technologies\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"contentUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"width\":989,\"height\":367,\"caption\":\"Skynats Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/skynats\",\"https:\\\/\\\/x.com\\\/skynatstech\",\"https:\\\/\\\/www.instagram.com\\\/skynatstech\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/skynats-technologies\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCvTAjrFJ4_E2MJKwlDHomlg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/2428d280a8b32a1fbd909b1411e32fb7\",\"name\":\"Arjun N\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e0f4d2489abeea1769beb944d2258c862259b62ff26853075066ca8ad37e3333?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e0f4d2489abeea1769beb944d2258c862259b62ff26853075066ca8ad37e3333?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e0f4d2489abeea1769beb944d2258c862259b62ff26853075066ca8ad37e3333?s=96&d=mm&r=g\",\"caption\":\"Arjun N\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"DigitalOcean 403 Forbidden NGINX Error | Skynats","description":"When attempts to access a part of the webserver with insufficient permissions, Nginx 403 Forbidden error is generated. Here is the solution.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/","og_locale":"en_US","og_type":"article","og_title":"DigitalOcean 403 Forbidden NGINX Error","og_description":"When attempts to access a part of the webserver with insufficient permissions, Nginx 403 Forbidden error is generated. Here is the solution.","og_url":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/","og_site_name":"Server Management Services | Cloud Management | Skynats","article_publisher":"https:\/\/www.facebook.com\/skynats","article_published_time":"2022-03-29T14:11:47+00:00","article_modified_time":"2025-03-12T10:21:39+00:00","author":"Arjun N","twitter_card":"summary_large_image","twitter_creator":"@skynatstech","twitter_site":"@skynatstech","twitter_misc":{"Written by":"Arjun N","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/#article","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/"},"author":{"name":"Arjun N","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/2428d280a8b32a1fbd909b1411e32fb7"},"headline":"DigitalOcean 403 Forbidden NGINX Error","datePublished":"2022-03-29T14:11:47+00:00","dateModified":"2025-03-12T10:21:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/"},"wordCount":329,"publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"keywords":["403 forbidden error"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/","url":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/","name":"DigitalOcean 403 Forbidden NGINX Error | Skynats","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/#website"},"datePublished":"2022-03-29T14:11:47+00:00","dateModified":"2025-03-12T10:21:39+00:00","description":"When attempts to access a part of the webserver with insufficient permissions, Nginx 403 Forbidden error is generated. Here is the solution.","breadcrumb":{"@id":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.skynats.com\/blog\/digitalocean-403-forbidden-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.skynats.com\/blog\/"},{"@type":"ListItem","position":2,"name":"DigitalOcean 403 Forbidden NGINX Error"}]},{"@type":"WebSite","@id":"https:\/\/www.skynats.com\/blog\/#website","url":"https:\/\/www.skynats.com\/blog\/","name":"Server Management Services | Cloud Management | Skynats","description":"Server Management and Cloud Management","publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.skynats.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.skynats.com\/blog\/#organization","name":"Skynats Technologies","url":"https:\/\/www.skynats.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","contentUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","width":989,"height":367,"caption":"Skynats Technologies"},"image":{"@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/skynats","https:\/\/x.com\/skynatstech","https:\/\/www.instagram.com\/skynatstech\/","https:\/\/www.linkedin.com\/company\/skynats-technologies","https:\/\/www.youtube.com\/channel\/UCvTAjrFJ4_E2MJKwlDHomlg"]},{"@type":"Person","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/2428d280a8b32a1fbd909b1411e32fb7","name":"Arjun N","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e0f4d2489abeea1769beb944d2258c862259b62ff26853075066ca8ad37e3333?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e0f4d2489abeea1769beb944d2258c862259b62ff26853075066ca8ad37e3333?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e0f4d2489abeea1769beb944d2258c862259b62ff26853075066ca8ad37e3333?s=96&d=mm&r=g","caption":"Arjun N"}}]}},"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/9330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=9330"}],"version-history":[{"count":1,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/9330\/revisions"}],"predecessor-version":[{"id":14404,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/9330\/revisions\/14404"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=9330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=9330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=9330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}