{"id":17861,"date":"2024-11-28T09:01:18","date_gmt":"2024-11-28T09:01:18","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=17861"},"modified":"2024-11-28T12:53:10","modified_gmt":"2024-11-28T12:53:10","password":"","slug":"how-to-install-and-configure-nginx-on-cwp","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/","title":{"rendered":"How to Install and Configure NGINX on CWP"},"content":{"rendered":"\n<p>NGINX is a high-performance web server and reverse proxy used widely for its speed and resource efficiency. Pairing NGINX with CWP (CentOS Web Panel) allows for improved website performance and a user-friendly management experience. Here\u2019s how to install and configure NGINX on CWP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">P<strong>rerequisites<\/strong><\/h3>\n\n\n\n<p>Before you start, ensure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A server running\u00a0<strong>Almalinux<\/strong>\/<strong>CentOS 7\/8<\/strong>\u00a0with\u00a0<strong><a href=\"https:\/\/truehost.com\/support\/knowledge-base\/complete-guide-on-how-to-properly-install-control-web-panelcwp\/\" target=\"_blank\" rel=\"noreferrer noopener\">CWP installed<\/a><\/strong>.<\/li>\n\n\n\n<li><strong>Root or sudo access<\/strong>\u00a0to the server.<\/li>\n\n\n\n<li>A domain name pointed to the server\u2019s IP address.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step by step on How to Install and Configure NGINX on CWP<\/strong><\/h4>\n\n\n\n<p>Since you have your CWP server ready. We can now proceed with the steps to install and configure NGINX.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access your server <a href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-access-a-server-via-ssh-terminal\/\" target=\"_blank\" rel=\"noreferrer noopener\">via SSH<\/a>, using root user, or a sudo user, then escalate to root terminal.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Upgrade your server.<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>yum update -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"262\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-1024x262.png\" alt=\"\" class=\"wp-image-17871\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-1024x262.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-300x77.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-768x196.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686.png 1236w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install files that are needed for the set-up<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install pcre pcre-devel zlib-devel openssl-devel -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"418\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-687-1024x418.png\" alt=\"\" class=\"wp-image-17872\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-687-1024x418.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-687-300x123.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-687-768x314.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-687.png 1221w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable NGINX Epel Repository then install NGINX.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install epel-release -y\n\nsudo yum install nginx -y<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create the proxy.inc file.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf \/etc\/nginx\/proxy.inc\n\nvi \/etc\/nginx\/proxy.inc<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then paste the code below in the file<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Proxy file starts here\n# More info here: http:\/\/wiki.nginx.org\/HttpProxyModule\n\nproxy_buffering off;\nproxy_connect_timeout 59s;\nproxy_send_timeout 600;\nproxy_read_timeout 600;\nproxy_buffer_size 64k;\nproxy_buffers 16 32k;\nproxy_busy_buffers_size 64k;\nproxy_temp_file_write_size 64k;\nproxy_pass_header Set-Cookie;\nproxy_redirect off;\nproxy_hide_header Vary;\nproxy_hide_header X-Powered-By;\nproxy_set_header Accept-Encoding '';\n#If you want to get the cache-control and expire headers from apache, comment out 'proxy_ignore_headers' and uncomment 'proxy_pass_header Expires;' and 'proxy_pass_header Cache-Control\n#proxy_pass_header Expires;\n#proxy_pass_header Cache-Control;\nproxy_ignore_headers Cache-Control Expires;\nproxy_set_header Referer $http_referer;\nproxy_set_header Host $host;\nproxy_set_header Cookie $http_cookie;\nproxy_set_header X-Real-IP $remote_addr;\nproxy_set_header X-Forwarded-Host $host;\nproxy_set_header X-Forwarded-Server $host;\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\n#Proxy file ends here<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create an NGINX configuration file using these commands<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf \/etc\/nginx\/nginx.conf\nvi \/etc\/nginx\/nginx.conf<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add the code below in the file, then save and exit it.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Nginx config starts here\n\nuser nobody;\nworker_processes auto;\n#worker_rlimit_nofile 20480;\nerror_log \/var\/log\/nginx\/error.log warn;\npid \/var\/run\/nginx.pid;\nevents {\nworker_connections 1024; # increase for busier servers\nuse epoll; # you should use epoll for Linux kernels 2.6.x\n}\nhttp {\nopen_file_cache max=5000 inactive=30s;\nopen_file_cache_valid 120s;\nopen_file_cache_min_uses 2;\nopen_file_cache_errors off;\nopen_log_file_cache max=1024 inactive=30s min_uses=2;\nserver_names_hash_max_size 10240;\nserver_names_hash_bucket_size 1024;\ninclude mime.types;\ndefault_type application\/octet-stream;\nsendfile on;\ntcp_nopush on;\ntcp_nodelay on;\nkeepalive_timeout 5;\ngzip on;\ngzip_vary on;\ngzip_disable \"MSIE &#91;1-6]\\.\";\ngzip_proxied any;\ngzip_http_version 1.1;\ngzip_min_length 1000;\ngzip_comp_level 6;\ngzip_buffers 16 8k;\ngzip_types text\/plain text\/xml text\/css application\/x-javascript application\/xml image\/png image\/x-icon image\/gif image\/jpeg application\/xml+rss text\/javascript application\/atom+xml application\/javascript application\/json;\nignore_invalid_headers on;\nclient_header_timeout 3m;\nclient_body_timeout 3m;\nclient_max_body_size 200m;\nsend_timeout 3m;\nconnection_pool_size 256;\nclient_header_buffer_size 4k;\nlarge_client_header_buffers 4 32k;\nrequest_pool_size 4k;\noutput_buffers 4 32k;\npostpone_output 1460;\nproxy_temp_path \/tmp\/nginx_temp;\nlog_format bytes_log \"$msec $bytes_sent .\";\n# Include site configurations\ninclude \/etc\/nginx\/conf.d\/*.conf;\n}\n\n# Nginx config ends here<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"751\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-696-1024x751.png\" alt=\"\" class=\"wp-image-17885\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-696-1024x751.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-696-300x220.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-696-768x563.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-696.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make a virtual host for your domain. Ensure to replace <strong>cwpnginx.tke.co.ke<\/strong> with your actual domain name.<\/li>\n\n\n\n<li>Also, replace <strong>your_server_IP<\/strong> with the the actual IP of your server, and <strong>your_username<\/strong> with your actual user account name.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/nginx\/conf.d\/<strong>cwpnginx.tke.co.ke.conf<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># Virtual host file starts here\n\nserver {\nlisten <strong>your_server_IP<\/strong>:80;\naccess_log \/var\/log\/nginx\/access.<strong>cwpnginx.tke.co.ke<\/strong>.log;\nerror_log \/var\/log\/nginx\/error.<strong>cwpnginx.tke.co.ke<\/strong>.log;\nserver_name <strong>cwpnginx.tke.co.ke<\/strong> www.<strong>cwpnginx.tke.co.ke<\/strong>;\nroot \/home\/<strong>your_username<\/strong>\/public_html;\nlocation \/ {\nlocation ~.*\\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot)\\$ {\nexpires 7d; #Comment this out if you're using the apache backend cache-control\/expires headers.\ntry_files \\$uri \\@backend;\n}\nerror_page 405 = \\@backend;\nerror_page 500 = \\@custom;\nadd_header X-Cache \"HIT from Backend\";\nproxy_pass http:\/\/<strong><strong>your_server_IP<\/strong><\/strong>:8181;\ninclude proxy.inc;\n}\nlocation \\@backend {\ninternal;\nproxy_pass http:\/\/<strong><strong>your_server_IP<\/strong><\/strong>:8181;\ninclude proxy.inc;\n}\nlocation \\@custom {\ninternal;\nproxy_pass http:\/\/<strong><strong>your_server_IP<\/strong><\/strong>:8181;\ninclude proxy.inc;\n}\nlocation ~ .*\\.(php|jsp|cgi|pl|py)?\\$ {\nproxy_pass http:\/\/<strong><strong>your_server_IP<\/strong><\/strong>:8181;\ninclude proxy.inc;\n}\nlocation ~ \/\\.ht {\ndeny all;\n}\n}\n\n# Virtual host file ends here<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"687\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-697-1024x687.png\" alt=\"\" class=\"wp-image-17886\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-697-1024x687.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-697-300x201.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-697-768x515.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-697.png 1118w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download and install the <strong>mod_raf<\/strong> packagem using these commands.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/src\n\nrm -rf mod_rpaf-0.8.4\n\nrm -rf v0.8.4.tar.gz\n\nwget https:\/\/github.com\/gnif\/mod_rpaf\/archive\/v0.8.4.tar.gz --no-check-certificate\n\ntar xzf v0.8.4.tar.gz\n\ncd mod_rpaf-0.8.4\n\nchmod +x apxs.sh\n\n\/usr\/local\/apache\/bin\/apxs -i -c -n mod_rpaf.so mod_rpaf.c<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Also create a configuration file for <strong>mod_raf<\/strong>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf \/usr\/local\/apache\/conf.d\/rpaf.conf\n\nvi -w \/usr\/local\/apache\/conf.d\/rpaf.conf<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Paste the code below in the file, replacing <strong><strong>your_server_IP<\/strong><\/strong> with your actual server IP, then save and exit it.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Mod_raf config file starts here\n\nLoadModule rpaf_module modules\/mod_rpaf.so\nRPAF_Enable On\nRPAF_ProxyIPs 127.0.0.1 <strong><strong>your_server_IP<\/strong><\/strong>\nRPAF_SetHostName On\nRPAF_SetHTTPS On\nRPAF_SetPort On\nRPAF_ForbidIfNotProxy Off\nRPAF_Header X-Forwarded-For\n\n# Mod_raf config file ends here<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-access-cwp-main-whm-panel\/\" target=\"_blank\" rel=\"noreferrer noopener\">Log in to CWP main panel<\/a> and navigate to <strong>CWP Settings >> Edit settings<\/strong>. <\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"400\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-698-1024x400.png\" alt=\"\" class=\"wp-image-17887\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-698-1024x400.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-698-300x117.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-698-768x300.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-698.png 1070w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change the Shared IP to your server IP, and Apache Port to 8181<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"879\" height=\"494\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-699.png\" alt=\"\" class=\"wp-image-17888\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-699.png 879w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-699-300x169.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-699-768x432.png 768w\" sizes=\"auto, (max-width: 879px) 100vw, 879px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the commands below to retart Apache and NGINX, also setting NGINX to start automatically when you reboot the server<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>service httpd restart\nservice nginx restart\nchkconfig nginx on<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">To completely remove Nginx and Mod_raf.<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Navigate to CWP Settings &#8211;>> Edit Settings and Change apache port to 80 <\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once done, run the following commands to remove the services<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>yum remove nginx -y\nrm -rf \/etc\/nginx\/\nrm -rf \/etc\/yum.repos.d\/nginx.repo\nrm -rf \/usr\/lib64\/httpd\/modules\/mod_rpaf.so\nrm -rf \/usr\/local\/apache\/modules\/mod_rpaf.so\nrm -rf \/usr\/local\/apache\/conf.d\/rpaf.c<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Restart Apache using this command<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><code>service httpd restart<\/code><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your server should be back to using Apache, and not NGINX<\/li>\n<\/ul>\n\n\n\n<p><strong>That will be all. Cheers!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NGINX is a high-performance web server and reverse proxy used widely for its speed and resource efficiency. Pairing NGINX with CWP (CentOS Web Panel) allows for improved website performance and a user-friendly management experience. Here\u2019s how to install and configure NGINX on CWP. Prerequisites Before you start, ensure: Step by step on How to Install [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1820,2120,1824,1879,2128],"doc_tag":[],"class_list":["post-17861","docs","type-docs","status-publish","hentry","doc_category-cloud-servers-in-kenya","doc_category-cwp-panel","doc_category-dedicated-servers","doc_category-servers","doc_category-vps-servers"],"year_month":"2026-06","word_count":1122,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Eugene","author_nicename":"eugene","author_url":"https:\/\/truehost.com\/support\/author\/eugene\/"},"doc_category_info":[{"term_name":"Cloud servers in Kenya","term_url":"https:\/\/truehost.com\/support\/docs-category\/cloud-servers-in-kenya\/"},{"term_name":"CWP Panel","term_url":"https:\/\/truehost.com\/support\/docs-category\/cwp-panel\/"},{"term_name":"dedicated servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/dedicated-servers\/"},{"term_name":"Servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/servers\/"},{"term_name":"VPS-Servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/vps-servers\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install and Configure NGINX on CWP -<\/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:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install and Configure NGINX on CWP -\" \/>\n<meta property=\"og:description\" content=\"NGINX is a high-performance web server and reverse proxy used widely for its speed and resource efficiency. Pairing NGINX with CWP (CentOS Web Panel) allows for improved website performance and a user-friendly management experience. Here\u2019s how to install and configure NGINX on CWP. Prerequisites Before you start, ensure: Step by step on How to Install [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-28T12:53:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-1024x262.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/\",\"name\":\"How to Install and Configure NGINX on CWP -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-686-1024x262.png\",\"datePublished\":\"2024-11-28T09:01:18+00:00\",\"dateModified\":\"2024-11-28T12:53:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-686-1024x262.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-686-1024x262.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-nginx-on-cwp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install and Configure NGINX on CWP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install and Configure NGINX on CWP -","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.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/","og_locale":"en_US","og_type":"article","og_title":"How to Install and Configure NGINX on CWP -","og_description":"NGINX is a high-performance web server and reverse proxy used widely for its speed and resource efficiency. Pairing NGINX with CWP (CentOS Web Panel) allows for improved website performance and a user-friendly management experience. Here\u2019s how to install and configure NGINX on CWP. Prerequisites Before you start, ensure: Step by step on How to Install [&hellip;]","og_url":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/","article_modified_time":"2024-11-28T12:53:10+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-1024x262.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/","url":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/","name":"How to Install and Configure NGINX on CWP -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/#primaryimage"},"image":{"@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-1024x262.png","datePublished":"2024-11-28T09:01:18+00:00","dateModified":"2024-11-28T12:53:10+00:00","breadcrumb":{"@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-1024x262.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-686-1024x262.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-nginx-on-cwp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Install and Configure NGINX on CWP"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/17861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=17861"}],"version-history":[{"count":7,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/17861\/revisions"}],"predecessor-version":[{"id":17889,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/17861\/revisions\/17889"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=17861"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=17861"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=17861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}