{"id":11,"date":"2024-11-29T05:23:08","date_gmt":"2024-11-28T20:23:08","guid":{"rendered":"https:\/\/touhyo.com\/blog\/?p=11"},"modified":"2025-08-19T12:12:08","modified_gmt":"2025-08-19T03:12:08","slug":"sub-domain-php","status":"publish","type":"post","link":"https:\/\/touhyo.com\/blog\/en\/sub-domain-php\/","title":{"rendered":"Individual subdomains"},"content":{"rendered":"\n<p>Added configuration to server (XServer) to run different PHP only for subdomains.<\/p>\n\n\n\n<p>First, add the following to &#8220;.htaccess&#8221;.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">Action myphp-script \/php.cgi<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">AddHandler myphp-script .php<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Next, save the following in php.cgi and upload it to the root (specify 705 permissions).<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">#!\/usr\/bin\/sh<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">exec \/usr\/bin\/php7.2-cgi<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>That is all.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Added configuration to server (XServer) to run different PHP only for subdomains. First, add the following to &#8220;.htaccess&#8221;. Next, save the following in php.cgi and upload it to the root (specify 705 permissions). That is all.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/touhyo.com\/blog\/?p=8","footnotes":""},"categories":[1],"tags":[],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-memo","en-US"],"_links":{"self":[{"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":8,"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/posts\/11\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/touhyo.com\/blog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}