{"id":62,"date":"2008-09-25T22:50:56","date_gmt":"2008-09-25T10:50:56","guid":{"rendered":"http:\/\/p-s.co.nz\/wordpress\/?p=62"},"modified":"2008-10-27T19:13:49","modified_gmt":"2008-10-27T07:13:49","slug":"apache-and-php-on-ubuntu-very-easy-installation","status":"publish","type":"post","link":"http:\/\/p-s.co.nz\/wordpress\/apache-and-php-on-ubuntu-very-easy-installation\/","title":{"rendered":"Apache and PHP on Ubuntu &#8211; Very Easy Installation"},"content":{"rendered":"<p>This was very easy &#8211; just install php and apache from synaptic and you are good to go.  At least for local testing purposes like I am interested in.  And if, like myself, you want your test scripts in \/home\/user\/public_html you only need to do the following:<\/p>\n<p>Copy the default website as a starting point.<br \/>\nsudo cp \/etc\/apache2\/sites-available\/default \/etc\/apache2\/sites-available\/mysite<br \/>\nEdit the new configuration file<br \/>\nsudo gedit \/etc\/apache2\/sites-available\/mysite<br \/>\nChange the DocumentRoot to point to the new location. For example, \/home\/user\/public_html\/<br \/>\nChange the Directory directive, replace &LT;Directory \/var\/www\/&GT;  to &LT;Directory \/home\/user\/public_html\/&GT;<\/p>\n<p>Now, we must deactivate the old site, and activate our new one. Ubuntu provides two small utilities that take care of this: a2ensite (apache2enable site) and a2dissite (apache2disable site).<br \/>\nsudo a2dissite default &#038;&#038; sudo a2ensite mysite<br \/>\nFinally, we restart Apache2:<br \/>\nsudo \/etc\/init.d\/apache2 restart<\/p>\n<p><a href=\"https:\/\/help.ubuntu.com\/community\/ApacheMySQLPHP\">https:\/\/help.ubuntu.com\/community\/ApacheMySQLPHP<\/a><\/p>\n<p>NB to install support for mysql (mysqli) use synaptic and search for mysqli.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This was very easy &#8211; just install php and apache from synaptic and you are good to go. At least for local testing purposes like I am interested in. And if, like myself, you want your test scripts in \/home\/user\/public_html &hellip; <a href=\"http:\/\/p-s.co.nz\/wordpress\/apache-and-php-on-ubuntu-very-easy-installation\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/62"}],"collection":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":7,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":104,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/62\/revisions\/104"}],"wp:attachment":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}