{"id":54,"date":"2018-04-25T17:52:55","date_gmt":"2018-04-25T17:52:55","guid":{"rendered":"https:\/\/techplushost.com\/blog\/?p=54"},"modified":"2018-04-25T17:52:55","modified_gmt":"2018-04-25T17:52:55","slug":"webmin-setting-up-multiple-php-versions-in-webmin-virtualmin","status":"publish","type":"post","link":"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/","title":{"rendered":"[Webmin] Setting up multiple PHP versions in Webmin\/Virtualmin"},"content":{"rendered":"<p>Webmin control panel allows you to have several PHP versions in the same server. There is a possibility to choose different PHP versions for seperate Virtual Servers (per domain and per directory).<\/p>\n<p><b>0. Preliminary requirements<\/b><\/p>\n<p>Webmin 1.8 using CentOS 6.<\/p>\n<p><b>1. Log into your server<\/b><\/p>\n<p>Log in to your server with root user.<\/p>\n<p><b>2. Install PHP 5.6 on CentOS 6<\/b><\/p>\n<p>Install the SCL Repo:<i><br \/>\n<\/i><\/p>\n<pre class=\"CodeBlock\"><i>yum install centos-release-scl<\/i><\/pre>\n<p>Install the PHP packages:<\/p>\n<pre class=\"CodeBlock\"><i>yum install rh-php56 rh-php56-php-mysqlnd<\/i><\/pre>\n<p><b>3. Install second PHP version<\/b><\/p>\n<p>In this case we will install PHP 7 on CentOS 6. Install the SCL Repo:<\/p>\n<pre class=\"CodeBlock\"><i>yum install centos-release-scl<\/i><\/pre>\n<p>Install the PHP packages:<\/p>\n<pre class=\"CodeBlock\"><i>yum install rh-php70 rh-php70-php-mysqlnd<\/i><\/pre>\n<p><b>4.\u00a0<\/b><b>Enable<\/b><i><b>\u00a0<\/b><\/i><b>\u201csuexec_module\u201d\u00a0<\/b><b>on server<\/b><\/p>\n<p>This will allow Webmin to recognize different PHP versions:<\/p>\n<pre class=\"CodeBlock\"><i>vi \/etc\/httpd\/conf\/httpd.conf<\/i><\/pre>\n<p>Find and remove comment from line \u201c#LoadModule suexec_module modules\/mod_suexec.so\u201d. It should look like this:<\/p>\n<pre class=\"CodeBlock\"><i>LoadModule suexec_module modules\/mod_suexec.so<\/i><\/pre>\n<p>Save and close the file. Then restart Apache:<\/p>\n<pre class=\"CodeBlock\"><i>service httpd restart<\/i><\/pre>\n<p><b>5.\u00a0<\/b><b>Log into your Webmin control panel<\/b><\/p>\n<p>If you haven&#8217;t done it yet, see how to use it in the link\u00a0here.<\/p>\n<p><b>6.<i>\u00a0<\/i>Re-Check Configuration of the server<\/b><\/p>\n<p>After logging into Webmin, go to Virtualmin, then go to \u201c<i>System<\/i><i>\u00a0Settings \u2192\u00a0<\/i><i>Re-Check Configuration<\/i>\u201d<\/p>\n<p>If you see the error:<\/p>\n<p>\u201c<i>Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page<\/i>.\u201d<\/p>\n<p>Press on \u201clist of DNS servers\u201d and in the empty line in \u201cDNS servers\u201d section enter localhost IP: 127.0.0.1 and press \u201cSave\u201d.<\/p>\n<p>Again go to \u201c<i>System<\/i><i>\u00a0Settings \u2192\u00a0<\/i><i>Re-Check Configuration<\/i>\u201d and you should see something like this:<\/p>\n<p><i>The following PHP versions are available : 5.5.38 (\/usr\/bin\/php-cgi), 5.6.25 (\/opt\/rh\/rh-php56\/root\/usr\/bin\/php-cgi), 7.0.10 (\/opt\/rh\/rh-php70\/root\/usr\/bin\/php-cgi)<\/i><\/p>\n<p><b>7.\u00a0Modify Server Templates<\/b><\/p>\n<p>Go to<i>\u00a0\u201cSystem Settings \u2192 Server Templates\u201d.\u00a0<\/i>Press on<i>\u00a0\u201cDefault Settings\u201d.<\/i><\/p>\n<p><a href=\"https:\/\/i2.wp.com\/i.imgur.com\/LhzdqEp.png?ssl=1\" target=\"_blank\" rel=\"noopener\"><img src=\"https:\/\/i2.wp.com\/i.imgur.com\/LhzdqEp.png?w=960&#038;ssl=1\" alt=\"\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>In the line<i>\u00a0\u201cEdit template section:\u201d\u00a0<\/i>choose\u00a0<i>\u201cApache website\u201d.<\/i>\u00a0Make sure that these settings are checked:<\/p>\n<pre class=\"CodeBlock\"><code><i>Automatically<\/i> <i>add appropriate SuExec directive?<\/i><\/code><code><i> - Yes<\/i><\/code><\/pre>\n<pre class=\"CodeBlock\"><code><i>Default PHP execution mode: CGI wrapper (run as virtual server owner)<\/i><\/code><\/pre>\n<p>Save by pressing the button \u201cSave\u201d. From now on, all created Virtual Servers in Virtualmin will recognize different installed PHP versions.<\/p>\n<p><b>8. Choose PHP version for your domain or directory<\/b><\/p>\n<p>Now you just need to choose the required PHP version for your domain. Just press on the Virtual Server you want to choose the PHP version for and go to \u201c<i>Server Configuration \u2192 PHP version<\/i>\u201d.<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/i.imgur.com\/olIZ7KH.png?ssl=1\" target=\"_blank\" rel=\"noopener\"><img src=\"https:\/\/i1.wp.com\/i.imgur.com\/olIZ7KH.png?w=960&#038;ssl=1\" alt=\"\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Here you can choose the PHP version for the whole domain and choose different PHP version for selected directory (enter the name of directory in the empty line).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Webmin control panel allows you to have several PHP versions in the same server. There is a possibility to choose different PHP versions for seperate Virtual Servers (per domain and per directory). 0. Preliminary requirements Webmin 1.8 using CentOS 6. 1. Log into your server Log in to your server &hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[5,10,11],"tags":[23,25,24],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Webmin] Setting up multiple PHP versions in Webmin\/Virtualmin | TechPlusHost | Blog<\/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:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Webmin] Setting up multiple PHP versions in Webmin\/Virtualmin | TechPlusHost | Blog\" \/>\n<meta property=\"og:description\" content=\"Webmin control panel allows you to have several PHP versions in the same server. There is a possibility to choose different PHP versions for seperate Virtual Servers (per domain and per directory). 0. Preliminary requirements Webmin 1.8 using CentOS 6. 1. Log into your server Log in to your server &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/\" \/>\n<meta property=\"og:site_name\" content=\"TechPlusHost | Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/web.facebook.com\/techplushost\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-25T17:52:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i.imgur.com\/LhzdqEp.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@techplushost\" \/>\n<meta name=\"twitter:site\" content=\"@techplushost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"Tolulope Oyeniyi\">\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\":\"Organization\",\"@id\":\"https:\/\/techplushost.com\/blog\/#organization\",\"name\":\"TechPlusHost\",\"url\":\"https:\/\/techplushost.com\/blog\/\",\"sameAs\":[\"https:\/\/web.facebook.com\/techplushost\",\"https:\/\/www.instagram.com\/techplushost\/\",\"https:\/\/twitter.com\/techplushost\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/techplushost.com\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i1.wp.com\/techplushost.com\/blog\/wp-content\/uploads\/2018\/04\/logo.png?fit=314%2C108&ssl=1\",\"width\":314,\"height\":108,\"caption\":\"TechPlusHost\"},\"image\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/techplushost.com\/blog\/#website\",\"url\":\"https:\/\/techplushost.com\/blog\/\",\"name\":\"TechPlusHost\",\"description\":\"Our Blog\",\"publisher\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/techplushost.com\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i.imgur.com\/LhzdqEp.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#webpage\",\"url\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/\",\"name\":\"[Webmin] Setting up multiple PHP versions in Webmin\/Virtualmin | TechPlusHost | Blog\",\"isPartOf\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#primaryimage\"},\"datePublished\":\"2018-04-25T17:52:55+00:00\",\"dateModified\":\"2018-04-25T17:52:55+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#webpage\"},\"author\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#\/schema\/person\/05c8d030ad69f48b481298cd68c7df43\"},\"headline\":\"[Webmin] Setting up multiple PHP versions in Webmin\/Virtualmin\",\"datePublished\":\"2018-04-25T17:52:55+00:00\",\"dateModified\":\"2018-04-25T17:52:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/techplushost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#primaryimage\"},\"keywords\":\"[Webmin] Setting up multiple PHP versions in Webmin\/Virtualmin,Virtualmin,Webmin\",\"articleSection\":\"Tutorials,Various Tutorials,Web hosting control panels\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/techplushost.com\/blog\/webmin-setting-up-multiple-php-versions-in-webmin-virtualmin\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/techplushost.com\/blog\/#\/schema\/person\/05c8d030ad69f48b481298cd68c7df43\",\"name\":\"Tolulope Oyeniyi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/techplushost.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/862d4163a73f8f6f83733690bfb1b535?s=96&d=wavatar&r=g\",\"caption\":\"Tolulope Oyeniyi\"},\"sameAs\":[\"https:\/\/techplushost.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9RiNW-S","jetpack-related-posts":[{"id":45,"url":"https:\/\/techplushost.com\/blog\/centmin-mod-installation-of-centmin-mod-control-panel\/","url_meta":{"origin":54,"position":0},"title":"[Centmin Mod] Installation of Centmin Mod control panel","date":"April 25, 2018","format":false,"excerpt":"CentMin Mod\u00a0is a shell based control panel for CentOS operating system with LEMP Stack install. It was intended for a single root user\/administrator to manage multiple or single website on a VPS. It is highly recommended for those who wish a simple control panel for their websites with no fancy\u2026","rel":"","context":"In &quot;KVM Based Servers&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":60,"url":"https:\/\/techplushost.com\/blog\/webuzo-installation-of-webuzo-control-panel\/","url_meta":{"origin":54,"position":1},"title":"[Webuzo] Installation of Webuzo Control Panel","date":"April 25, 2018","format":false,"excerpt":"Webuzo is a LAMP STACK and a Single User Control Panel. You can install Webuzo on any Virtual Server, Dedicated Server or deploy it in the form of Virtual Appliances. Webuzo can be easily installed on our virtual servers. Requirements Freshly installed CentOS 6\/7 or Ubuntu LTS YUM \/ apt-get\u2026","rel":"","context":"In &quot;Web hosting control panels&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":69,"url":"https:\/\/techplushost.com\/blog\/kloxo-installation-of-kloxo-mr-control-panel\/","url_meta":{"origin":54,"position":2},"title":"[Kloxo] Installation of Kloxo-MR Control Panel","date":"April 25, 2018","format":false,"excerpt":"Kloxo-MR is a free and open-source web hosting control panel for CentOS and Red Hat Linux distributions. It allows the host administrators to run a combination of lighttpd or Apache with djbdns or BIND, and provides a graphical interface to switch between these programs without losing data. It is also\u2026","rel":"","context":"In &quot;Web hosting control panels&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65,"url":"https:\/\/techplushost.com\/blog\/webmin-lets-encrypt-certificates-installation-in-your-webmin-control-panel\/","url_meta":{"origin":54,"position":3},"title":"[Webmin] Let's encrypt certificates installation in your Webmin control panel","date":"April 25, 2018","format":false,"excerpt":"Let\u2019s Encrypt is a free, automated, and open certificate authority (CA), run for the public\u2019s benefit. Let\u2019s Encrypt is a service provided by the Internet Security Research Group (ISRG). In this tutorial you will find out how you can benefit from these certificates by providing security for your Webmin websites.\u2026","rel":"","context":"In &quot;Tutorials&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":90,"url":"https:\/\/techplushost.com\/blog\/windows-connecting-to-windows-vps-server-using-rdp\/","url_meta":{"origin":54,"position":4},"title":"[Windows] Connecting to Windows VPS server using RDP","date":"May 3, 2019","format":false,"excerpt":"Remote Desktop Protocol (RDP)\u00a0- is protocol created by Microsoft, which provides a graphical interface for a user. RDP client is available in most operating systems. By default RDP uses 3389 TCP port.\u00a0Remote Desktop Connection\u00a0is the official program meant for login via RDP.\u00a0 Requirements: Windows VPS server with Windows 2012 or\u2026","rel":"","context":"In \"RDP\"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":82,"url":"https:\/\/techplushost.com\/blog\/cyberpanel-installation-and-starting-usage-of-cyberpanel\/","url_meta":{"origin":54,"position":5},"title":"[CyberPanel] Installation and starting usage of CyberPanel","date":"April 29, 2019","format":false,"excerpt":"Introduction: In this guide we will introduce you on how to install CyberPanel into your VPS. This is a control panel that eases the control on domains, databases, e-mails and users that are added to your server. For more information and updates on the CyberPanel, you can check the home\u2026","rel":"","context":"In &quot;Linux Applications&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts\/54"}],"collection":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":1,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/posts\/54\/revisions\/55"}],"wp:attachment":[{"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techplushost.com\/blog\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}