{"id":6291,"date":"2018-11-22T14:42:16","date_gmt":"2018-11-22T14:42:16","guid":{"rendered":"https:\/\/www.siliconhouse.net\/support\/?page_id=6291"},"modified":"2018-11-22T14:42:16","modified_gmt":"2018-11-22T14:42:16","slug":"host-python-apps-dedicated-hosting-plan","status":"publish","type":"page","link":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/","title":{"rendered":"How do i host python apps in Dedicated hosting plan?"},"content":{"rendered":"<div class=\"dedicated_server_hosting_features_center\">\n<div class=\"reseller_web_hosting_support_navigation\"><aside id=\"bcn_widget-2\" class=\"widget widget_breadcrumb_navxt amr_widget\"><span property=\"itemListElement\" typeof=\"ListItem\"><a property=\"item\" typeof=\"WebPage\" title=\"Go to Silicon House - Reseller Hosting - Dedicated Servers - Cloud.\" href=\"https:\/\/www.siliconhouse.net\/support\" class=\"home\"><span property=\"name\" style=\"color: #232323\"><b>Support Home<\/b><\/span><\/a><meta property=\"position\" content=\"1\"><\/span><\/aside><\/div>\n<div class=\"dedicated_server_hosting_features\">\n<p><a href=\"https:\/\/www.siliconhouse.net\/dedicated-servers-managed\">Linux Dedicated Server<\/a> allows you to host multiple websites under your web hosting space. Linux Dedicated Server comes with full root access where you will be having control to make any changes at any time. Python Hosting is designed to be user-friendly and easy to learn. It\u2019s not as widely used as PHP Hosting, but it\u2019s well-documented, and there are lots of modules available to make coding fast and fun.In that Python is a great language for creating web applications and you can make design your websites.This article will introduce you to Python and show you how to run Python scripts in the cpanel as,<\/p>\n<p><aside id=\"text-16\" class=\"widget widget_text amr_widget\">\t\t\t<div class=\"textwidget\"><div class=\"reseller_web_hosting_support_advts\">\r\n\r\n<div class=\"reseller_web_hosting_support_advts_left\">\r\n<a href=\"https:\/\/www.siliconhouse.net\/linux-reseller-web-hosting-india\" target=\"_blank\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/www.siliconhouse.net\/wp-content\/uploads\/2018\/06\/336X280-saffron-unlimited-499-kickstart.gif\" width=\"336\" height=\"280\" alt=\"Reseller Hosting Special Offer\"><\/a>\r\n<\/div>\r\n\r\n<div class=\"reseller_web_hosting_support_advts_right\">\r\n<a href=\"https:\/\/www.siliconhouse.net\/linux-cloud-server-hosting-india\" target=\"_blank\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/www.siliconhouse.net\/wp-content\/uploads\/2018\/06\/336X280-purple-enterprise-cloud-stak-19.jpg\" width=\"336\" height=\"280\" alt=\"Enterprise Cloud Stack\"><\/a>\r\n<\/div>\r\n\r\n<\/div><\/div>\n\t\t<\/aside><br \/>\n<aside id=\"text-20\" class=\"extendedwopts-md-center widget widget_text amr_widget\">\t\t\t<div class=\"textwidget\"><div class=\"reseller_web_hosting_support_advts\">\r\n<div class=\"reseller_web_hosting_support_advts_left\">\r\n<img decoding=\"async\" border=\"0\" src=\"http:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/12\/reseller-hosting-249-offer.gif\" width=\"320\" height=\"100\" alt=\"Reseller Hosting Special Offer\">\r\n<\/div>\r\n\r\n<div class=\"reseller_web_hosting_support_advts_right\">\r\n<img decoding=\"async\" border=\"0\" src=\"http:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/12\/reseller-hosting-249-offer.gif\" width=\"320\" height=\"100\" alt=\"Reseller Hosting Special Offer\">\r\n<\/div>\r\n\r\n<\/div><\/div>\n\t\t<\/aside><\/p>\n<div class=\"dedicated_server_hosting_features\">\n<p>[1] Log in to your cPanel<br \/>\n[2] Go to section Files &gt; File Manager<br \/>\n[3] You can choose whether you want to run the script in the cgi-bin folder or outside of it.<br \/>\n[4] Go to the cgi-bin folder<br \/>\n[5] Create a file with a .py extension, for example test.py in the \/home\/cPaneluser\/public_html\/cgi-bin directory).<br \/>\n[6] In order to create the file, click New File &gt; specify the name of the file with the required extension and click Create New File<br \/>\n[7] Change the permission of the file to 0755<\/p>\n<p>NOTE: Files are created with default permissions 0644. The .py file will become executable when the permissions are changed to 0755.<\/p>\n<p>[8] In order to change the permissions of the file you need to select the file &gt; click Change Permissions &gt; Mark Execute for User, Group, World columns and click Change Permissions:<br \/>\n[9] Open the file, click Edit and add the code.<\/p>\n<p>We will add the following script for testing purposes:<\/p>\n<p>!\/usr\/bin\/python<\/p>\n<p>print &#8220;Content-type: text\/html\\n\\n&#8221;<br \/>\nprint &#8220;How to run Python scripts in cPanel<\/p>\n<p>NOTE: The file should start with the path to the Python scripts that is \/usr\/bin\/python on our servers, but you can run the whereis python command via SSH to check the directory.<\/p>\n<p>Now the script should work using http:\/\/domain.com\/cgi-bin\/test.py<\/p>\n<p>Also if you would like to run the Python file not in the cgi-bin folder (in public_html or any other directory), it is necessary to add the following code to the .htaccess file in the same directory where the Python script is placed<\/p>\n<p>Options +ExecCGI<br \/>\nAddHandler cgi-script .py<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux Dedicated Server allows you to host multiple websites under your web hosting space. Linux Dedicated Server comes with full<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":27,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6291","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How do i host Python apps in Dedicated hosting plan?<\/title>\n<meta name=\"description\" content=\"Python is a great language for creating web applications and it will to be user-friendly and easy to learn. The Extension of python file is .py\" \/>\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.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How do i host Python apps in Dedicated hosting plan?\" \/>\n<meta property=\"og:description\" content=\"Python is a great language for creating web applications and it will to be user-friendly and easy to learn. The Extension of python file is .py\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/\" \/>\n<meta property=\"og:site_name\" content=\"Silicon House - Reseller Hosting - Dedicated Servers - Cloud\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/siliconhouse.net\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@siliconhouse\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/\",\"url\":\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/\",\"name\":\"How do i host Python apps in Dedicated hosting plan?\",\"isPartOf\":{\"@id\":\"https:\/\/www.siliconhouse.net\/support\/#website\"},\"datePublished\":\"2018-11-22T14:42:16+00:00\",\"description\":\"Python is a great language for creating web applications and it will to be user-friendly and easy to learn. The Extension of python file is .py\",\"breadcrumb\":{\"@id\":\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.siliconhouse.net\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dedicated Servers\",\"item\":\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Linux Dedicated Server Hosting\",\"item\":\"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How do i host python apps in Dedicated hosting plan?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.siliconhouse.net\/support\/#website\",\"url\":\"https:\/\/www.siliconhouse.net\/support\/\",\"name\":\"Silicon House - Reseller Hosting - Dedicated Servers - Cloud\",\"description\":\"Reseller Hosting - Dedicated Servers - Cloud\",\"publisher\":{\"@id\":\"https:\/\/www.siliconhouse.net\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.siliconhouse.net\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.siliconhouse.net\/support\/#organization\",\"name\":\"Silicon House\",\"url\":\"https:\/\/www.siliconhouse.net\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.siliconhouse.net\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/10\/siliconhouse-logo.png\",\"contentUrl\":\"https:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/10\/siliconhouse-logo.png\",\"width\":42,\"height\":40,\"caption\":\"Silicon House\"},\"image\":{\"@id\":\"https:\/\/www.siliconhouse.net\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/siliconhouse.net\",\"https:\/\/x.com\/siliconhouse\",\"https:\/\/www.youtube.com\/siliconhouse\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How do i host Python apps in Dedicated hosting plan?","description":"Python is a great language for creating web applications and it will to be user-friendly and easy to learn. The Extension of python file is .py","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.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/","og_locale":"en_US","og_type":"article","og_title":"How do i host Python apps in Dedicated hosting plan?","og_description":"Python is a great language for creating web applications and it will to be user-friendly and easy to learn. The Extension of python file is .py","og_url":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/","og_site_name":"Silicon House - Reseller Hosting - Dedicated Servers - Cloud","article_publisher":"https:\/\/www.facebook.com\/siliconhouse.net","twitter_card":"summary_large_image","twitter_site":"@siliconhouse","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/","url":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/","name":"How do i host Python apps in Dedicated hosting plan?","isPartOf":{"@id":"https:\/\/www.siliconhouse.net\/support\/#website"},"datePublished":"2018-11-22T14:42:16+00:00","description":"Python is a great language for creating web applications and it will to be user-friendly and easy to learn. The Extension of python file is .py","breadcrumb":{"@id":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/host-python-apps-dedicated-hosting-plan\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.siliconhouse.net\/support\/"},{"@type":"ListItem","position":2,"name":"Dedicated Servers","item":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/"},{"@type":"ListItem","position":3,"name":"Linux Dedicated Server Hosting","item":"https:\/\/www.siliconhouse.net\/support\/dedicated-servers\/linux-dedicated-server-hosting\/"},{"@type":"ListItem","position":4,"name":"How do i host python apps in Dedicated hosting plan?"}]},{"@type":"WebSite","@id":"https:\/\/www.siliconhouse.net\/support\/#website","url":"https:\/\/www.siliconhouse.net\/support\/","name":"Silicon House - Reseller Hosting - Dedicated Servers - Cloud","description":"Reseller Hosting - Dedicated Servers - Cloud","publisher":{"@id":"https:\/\/www.siliconhouse.net\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.siliconhouse.net\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.siliconhouse.net\/support\/#organization","name":"Silicon House","url":"https:\/\/www.siliconhouse.net\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.siliconhouse.net\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/10\/siliconhouse-logo.png","contentUrl":"https:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/10\/siliconhouse-logo.png","width":42,"height":40,"caption":"Silicon House"},"image":{"@id":"https:\/\/www.siliconhouse.net\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/siliconhouse.net","https:\/\/x.com\/siliconhouse","https:\/\/www.youtube.com\/siliconhouse"]}]}},"_links":{"self":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages\/6291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/comments?post=6291"}],"version-history":[{"count":1,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages\/6291\/revisions"}],"predecessor-version":[{"id":6295,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages\/6291\/revisions\/6295"}],"up":[{"embeddable":true,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages\/27"}],"wp:attachment":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/media?parent=6291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}