{"id":3355,"date":"2016-04-07T17:45:00","date_gmt":"2016-04-07T17:45:00","guid":{"rendered":"https:\/\/news.dream.press\/?post_type=announcement&#038;p=3355"},"modified":"2025-05-06T18:48:03","modified_gmt":"2025-05-06T18:48:03","slug":"introducing-extra-web-security-for-nginx-services","status":"publish","type":"announcement","link":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/","title":{"rendered":"Introducing Extra Web Security for Nginx Services"},"content":{"rendered":"\n<p>Apache has traditionally been the king of&nbsp;<a href=\"https:\/\/www.dreamhost.com\/hosting\/\">shared web hosting<\/a>. It\u2019s popular, stable, flexible, and well-supported across a wide variety of platforms. It\u2019s certainly not, however, the only option available for serving HTTP traffic. Other alternatives, such as&nbsp;<a href=\"https:\/\/www.nginx.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Nginx<\/a>, have existed for a while, and are growing in usage as website owners demand greater levels of performance and scalability. I want to spend a bit of time examining Nginx, some of its benefits and drawbacks, and how we\u2019re improving its provision to our customers as an alternative to traditional Apache servers.<\/p>\n\n\n\n<p>At its core, Nginx is an incredibly efficient and&nbsp;<a href=\"https:\/\/www.dreamhost.com\/academy\/what-is-https-and-why-does-it-matter-for-your-website\/\">powerful HTTP server<\/a>. Its single-threaded, asynchronous request-handling model stands in contrast to Apache\u2019s process-per-connection. By leveraging a fast event loop, a single Nginx process can scale to handle thousands of concurrent requests while maintaining minimal memory usage (in most common workloads, just a few dozen megabytes of RAM). Additionally, Nginx\u2019s modular architecture allows developers and community members to build new solutions to extend Nginx functionality. In some cases open source module development has spawned active communities around extending Nginx functionality.<\/p>\n\n\n<div class=\"article-cta-shared article-cta-small\">\n\t<div class=\"tr-img-wrap-outer jsLoading\"><img decoding=\"async\" class=\"js-img-lazy \" src=\"https:\/\/www.dreamhost.com\/news\/wp-content\/themes\/dhtheme2023\/assets\/img\/lazy-loading-transparent.webp\" data-src=\"https:\/\/www.dreamhost.com\/news\/wp-content\/themes\/dhtheme2023\/assets\/img\/article-small-ad-cta-placeholder.jpg\"  alt=\"Ad background image\" \/><\/div>\n\n\t<a href='https:\/\/www.dreamhost.com\/hosting\/vps\/' class='link-top'>\n\t\t<span>VPS Plans<\/span>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\" width=\"15\"><path d=\"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/><\/svg>\n\t<\/a>\n\n\t<div class=\"content-btm\">\n\t\t<h2 class=\"h2--md\">\n\t\t\tWe Know You&#8217;ve Got Lots of VPS Options\n\t\t<\/h2>\n\t\t<p class=\"p--md\">\n\t\t\tHere\u2019s how DreamHost\u2019s VPS offering stands apart: 24\/7 customer support, an intuitive panel, scalable RAM, unlimited bandwidth, unlimited hosting domains, and SSD storage.\n\t\t<\/p>\n\n\t\t        <a\n            href=\"https:\/\/www.dreamhost.com\/hosting\/vps\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                        >\n            Choose Your VPS Plan        <\/a>\n\n\t<\/div>\n<\/div>\n\n\n<p>While <a href=\"https:\/\/help.dreamhost.com\/hc\/en-us\/articles\/216431827-Nginx-overview\" target=\"_blank\" rel=\"noreferrer noopener\">we\u2019ve long offered Nginx for VPS and dedicated servers<\/a> as an alternative to the traditional Apache service, we haven\u2019t provided all of the extra bells and whistles we do with Apache, particularly with respect to built-in application security. Historically, community-driven web application firewall solutions for Nginx have been a bit lackluster. <a href=\"https:\/\/www.trustwave.com\/Company\/SpiderLabs\/\" target=\"_blank\" rel=\"noreferrer noopener\">SpiderLabs<\/a>, the team behind the venerable <a href=\"https:\/\/www.modsecurity.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">ModSecurity<\/a> solution for Apache, did build support for Nginx as community adoption of the alternate server grew, but stability and compatibility problems have plagued the fork for years. SpiderLabs is working on a new version of ModSecurity designed to be portable to a number of HTTP servers, but the endeavor is still very much in beta. Other WAF solutions for Nginx, such as Naxsi (a native Nginx module designed to prevent XSS and SQLi attacks), do exist, but lack the robustness and feature set that ModSecurity provides. Ultimately, no stable, turnkey, open source solution exists as an alternative to ModSecurity for Nginx \u2014 until now.<\/p>\n\n\n\n<p><strong>Enter&nbsp;<\/strong><a href=\"https:\/\/github.com\/p0pr0ck5\/lua-resty-waf\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>lua-resty-waf<\/strong><\/a><strong>.<\/strong><\/p>\n\n\n\n<p>This project is built on the <a href=\"https:\/\/openresty.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenResty<\/a> platform, a software bundle combining the original Nginx project with the Lua interpreter and efficient JIT compiler. The platform allows users to quickly develop and scale applications using the Lua language, while leveraging the flexibility and power that Nginx provides. Lua-resty-waf seeks to provide a ModSecurity-compatible WAF feature set with Nginx, using the built-in LuaJIT compiler to provide an efficient application firewall platform capable of using existing ModSecurity rulesets.<\/p>\n\n\n\n<p>Lua-resty-waf was originally written as part of my Master\u2019s Thesis. The idea behind the project was to explore the costs, risks and requirements associated with developing a cloud WAF infrastructure, similar to what commercial cloud security providers like Cloudflare and Incapsula provide \u2014 and then provide that service free of charge. Totally unsustainable, of course, but as an academic exercise it was an educating experience. I decided to focus on releasing the source of the firewall engine powering the service, continuing to develop features and exploring new methods of anomalous and malicious behavior detection. As we examined our Nginx offering at DreamHost, we realized that we could leverage this project to provide the same application security that we do using ModSecurity for our Apache services.<\/p>\n\n\n\n<p>Developing this project has been another big win for&nbsp;<a href=\"https:\/\/www.dreamhost.com\/blog\/2015\/02\/06\/open-source-and-dreamhost-like-peanut-butter-and-chocolate\/\" target=\"_blank\" rel=\"noreferrer noopener\">DreamHost\u2019s commitment to contributing to open source projects<\/a>. We\u2019ve spent a good chunk of the last few months refactoring, adding new features, and testing the project, and we\u2019re now offering it to users running on modern VPS and dedicated server platforms.&nbsp;<strong>This means Nginx users can now receive the same built-in security that we provide for Apache services, including<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Protection against zero-day threats for popular CMSes such as WordPress, <a href=\"https:\/\/www.dreamhost.com\/blog\/beginners-guide-to-joomla\/\">Joomla<\/a>, <a href=\"https:\/\/www.dreamhost.com\/blog\/beginners-guide-to-drupal\/\">Drupal<\/a>, and more<\/li>\n\n\n\n<li>Brute-force attack mitigation against common application user authentication endpoints<\/li>\n\n\n\n<li>Protection from malicious automated bots and data harvesting services<\/li>\n\n\n\n<li>Monitoring of interactive platform functionality, such as blog comments, for spam, DDoS, and vulnerability exploit<\/li>\n\n\n\n<li>Behavioral analysis of traffic based on hit rate and request target<\/li>\n<\/ul>\n\n\n\n<p>All of this is provided seamlessly by the lua-resty-waf platform that is now bundled into modern VPS and dedicated servers (by modern, we mean&nbsp;<a href=\"https:\/\/www.dreamhost.com\/blog\/qa-how-dreamhost-keeps-websites-safe\/\">servers running Ubuntu<\/a>&nbsp;\u2014 if you haven\u2019t upgraded, you should!). Enabling the security for your domain is as simple as checking the \u201cExtra Web Security\u201d box&nbsp;<a href=\"https:\/\/panel.dreamhost.com\/index.cgi?tree=domain.manage&amp;\" target=\"_blank\" rel=\"noreferrer noopener\">within your domain management panel<\/a>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"67\" src=\"https:\/\/www.dreamhost.com\/news\/wp-content\/uploads\/2023\/02\/Screen-Shot-2016-04-06-at-12.45.51-PM.png\" alt=\"Nginx\" class=\"wp-image-3360\" srcset=\"https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/Screen-Shot-2016-04-06-at-12.45.51-PM.png 500w, https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/Screen-Shot-2016-04-06-at-12.45.51-PM-300x40.png 300w, https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/Screen-Shot-2016-04-06-at-12.45.51-PM-96x13.png 96w, https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/Screen-Shot-2016-04-06-at-12.45.51-PM-192x26.png 192w, https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/Screen-Shot-2016-04-06-at-12.45.51-PM-460x62.png 460w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/figure>\n\n\n\n<p>So what are you waiting for? Check that security box and protect your site today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache has traditionally been the king of&nbsp;shared web hosting. It\u2019s popular, stable, flexible, and well-supported across a wide variety of platforms. It\u2019s certainly not, however, the only option available for serving HTTP traffic. Other alternatives, such as&nbsp;Nginx, have existed for a while, and are growing in usage as website owners demand greater levels of performance [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":3356,"menu_order":0,"template":"","meta":{"_acf_changed":false,"_yoast_wpseo_metadesc":"","footnotes":""},"class_list":["post-3355","announcement","type-announcement","status-publish","has-post-thumbnail","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Extra web security for Nginx<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extra web security for Nginx\" \/>\n<meta property=\"og:description\" content=\"Apache has traditionally been the king of&nbsp;shared web hosting. It\u2019s popular, stable, flexible, and well-supported across a wide variety of platforms. It\u2019s certainly not, however, the only option available for serving HTTP traffic. Other alternatives, such as&nbsp;Nginx, have existed for a while, and are growing in usage as website owners demand greater levels of performance [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dreamhost.com\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-06T18:48:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/news\/wp-content\/uploads\/2023\/02\/stock-image-computer_crime_concept-750x500-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extra web security for Nginx","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:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/","og_locale":"en_US","og_type":"article","og_title":"Extra web security for Nginx","og_description":"Apache has traditionally been the king of&nbsp;shared web hosting. It\u2019s popular, stable, flexible, and well-supported across a wide variety of platforms. It\u2019s certainly not, however, the only option available for serving HTTP traffic. Other alternatives, such as&nbsp;Nginx, have existed for a while, and are growing in usage as website owners demand greater levels of performance [&hellip;]","og_url":"https:\/\/www.dreamhost.com\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/","og_site_name":"DreamHost","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_modified_time":"2025-05-06T18:48:03+00:00","og_image":[{"width":750,"height":500,"url":"https:\/\/www.dreamhost.com\/news\/wp-content\/uploads\/2023\/02\/stock-image-computer_crime_concept-750x500-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@dreamhost","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/#article","isPartOf":{"@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/"},"author":{"name":"Robert Paprocki","@id":"https:\/\/news.dream.press\/news\/#\/schema\/person\/0a450fd9bb68c27a97a3d2f6948075fb"},"headline":"Introducing Extra Web Security for Nginx Services","datePublished":"2016-04-07T17:45:00+00:00","dateModified":"2025-05-06T18:48:03+00:00","mainEntityOfPage":{"@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/"},"wordCount":767,"publisher":{"@id":"https:\/\/news.dream.press\/news\/#organization"},"image":{"@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/#primaryimage"},"thumbnailUrl":"https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/stock-image-computer_crime_concept-750x500-1.jpg","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/","url":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/","name":"Extra web security for Nginx","isPartOf":{"@id":"https:\/\/news.dream.press\/news\/#website"},"primaryImageOfPage":{"@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/#primaryimage"},"image":{"@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/#primaryimage"},"thumbnailUrl":"https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/stock-image-computer_crime_concept-750x500-1.jpg","datePublished":"2016-04-07T17:45:00+00:00","dateModified":"2025-05-06T18:48:03+00:00","breadcrumb":{"@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/#primaryimage","url":"https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/stock-image-computer_crime_concept-750x500-1.jpg","contentUrl":"https:\/\/news.dream.press\/news\/wp-content\/uploads\/2023\/02\/stock-image-computer_crime_concept-750x500-1.jpg","width":750,"height":500,"caption":"Introducing Extra Web Security for Nginx Services thumbnail"},{"@type":"BreadcrumbList","@id":"https:\/\/news.dream.press\/news\/announcements\/introducing-extra-web-security-for-nginx-services\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dreamhost.com\/news\/"},{"@type":"ListItem","position":2,"name":"Announcements","item":"https:\/\/www.dreamhost.com\/news\/announcements\/"},{"@type":"ListItem","position":3,"name":"Introducing Extra Web Security for Nginx Services"}]},{"@type":"WebSite","@id":"https:\/\/news.dream.press\/news\/#website","url":"https:\/\/news.dream.press\/news\/","name":"DreamHost News","description":"Product announcements, events, and more.","publisher":{"@id":"https:\/\/news.dream.press\/news\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/news.dream.press\/news\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/news.dream.press\/news\/#organization","name":"DreamHost","url":"https:\/\/news.dream.press\/news\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/news.dream.press\/news\/#\/schema\/logo\/image\/","url":"https:\/\/www.dreamhost.com\/news\/wp-content\/uploads\/2023\/03\/dreamhost-events.png","contentUrl":"https:\/\/www.dreamhost.com\/news\/wp-content\/uploads\/2023\/03\/dreamhost-events.png","width":1598,"height":921,"caption":"DreamHost"},"image":{"@id":"https:\/\/news.dream.press\/news\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost"]},{"@type":"Person","@id":"https:\/\/news.dream.press\/news\/#\/schema\/person\/0a450fd9bb68c27a97a3d2f6948075fb","name":"Robert Paprocki","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5145620591728e9a7e0f3d33dea40854eaa03f4b682c36118a2750e3d578c203?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5145620591728e9a7e0f3d33dea40854eaa03f4b682c36118a2750e3d578c203?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5145620591728e9a7e0f3d33dea40854eaa03f4b682c36118a2750e3d578c203?s=96&d=mm&r=g","caption":"Robert Paprocki"},"url":"https:\/\/news.dream.press\/news\/author\/robert-paprocki\/"}]}},"lang":"en","translations":{"en":3355,"de":7446,"pt":7447,"es":7448,"pl":7449,"ru":7450,"uk":7452,"it":11777,"fr":12109,"nl":12125},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/announcements\/3355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/announcements"}],"about":[{"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/types\/announcement"}],"author":[{"embeddable":true,"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/users\/11"}],"version-history":[{"count":4,"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/announcements\/3355\/revisions"}],"predecessor-version":[{"id":3362,"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/announcements\/3355\/revisions\/3362"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/media\/3356"}],"wp:attachment":[{"href":"https:\/\/news.dream.press\/news\/wp-json\/wp\/v2\/media?parent=3355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}