{"id":10600,"date":"2018-01-11T14:38:56","date_gmt":"2018-01-11T21:38:56","guid":{"rendered":"http:\/\/macblaze.ca\/?p=10600"},"modified":"2018-01-11T09:46:14","modified_gmt":"2018-01-11T16:46:14","slug":"new-testing-server-2016","status":"publish","type":"post","link":"https:\/\/macblaze.ca\/?p=10600","title":{"rendered":"New Testing Server 2016"},"content":{"rendered":"<blockquote><p>I started this post back in August 2016 when I set my old Mac mini up as a media server and webserver for testing purposes. I never finished it or got back to it, which is a bit of a bummer since it is all just so much gobbledygook to me now. Still, it documents the process I used this time to set up Apache, php and ftp. And, since one of the first purposes of this site was to store and have available various computer processes I had engaged in I guess I will post it for posterity despite its incompleteness.<\/p><\/blockquote>\n<h3>&nbsp;<\/h3>\n<h3>Set up Server<\/h3>\n<p>https:\/\/mallinson.ca\/osx-web-development\/<\/p>\n<h3>Enable Root user<br \/>\nDirectory Utility<br \/>\nEdit&#8211;&gt;Enable Root User<\/h3>\n<p>MySQL : http:\/\/dev.mysql.com\/downloads\/mysql\/<\/p>\n<h3>Apache<\/h3>\n<p><code>sudo apachectl start<br \/>\nsudo apachectl restart<\/code><br \/>\n\/private\/etc\/apache2\/httpd.conf<\/p>\n<h3>PHP<\/h3>\n<p><code>117 LoadModule php5_module libexec\/apache2\/libphp5.so<\/code><\/p>\n<p>220<br \/>\n221 AllowOverride none<br \/>\n222 Require all denied<br \/>\n223<\/p>\n<p>160 LoadModule vhost_alias_module libexec\/apache2\/mod_vhost_alias.so<br \/>\n477 Include \/private\/etc\/apache2\/extra\/httpd-vhosts.conf<\/p>\n<p>httpd-vhosts.conf file in the \/private\/etc\/apache2\/extra\/<br \/>\nServerAdmin info@macblaze.ca<br \/>\nDocumentRoot &#8220;\/www\/home\/&#8221;<br \/>\nServerName 192.168.1.10<br \/>\nErrorLog &#8220;\/private\/var\/log\/apache2\/home.macblaze.ca-error_log&#8221;<br \/>\nCustomLog &#8220;\/private\/var\/log\/apache2\/home.macblaze.ca-access_log&#8221; common<\/p>\n<p>IP to LocalHost<br \/>\nsudo nano \/etc\/hosts<\/p>\n<p>Add the Domain and \u2018www\u2018 alias to resolve to the localhost address<\/p>\n<p>127.0.0.1 apple.com www.apple.com<\/p>\n<p>sudo apachectl restart<\/p>\n<h3>Text Wrangler<\/h3>\n<p>http:\/\/www.barebones.com\/products\/textwrangler\/download.html<br \/>\nCommand Line tools<\/p>\n<h3>Set up A record for subdomain<\/h3>\n<h3>FTP Server<\/h3>\n<p><code>sudo -s launchctl load -w \/System\/Library\/LaunchDaemons\/ftp.plist <\/code><br \/>\n<code>sudo -s launchctl unload -w \/System\/Library\/LaunchDaemons\/ftp.plist<\/code><\/p>\n<p>Open up router to forward port 80 to localhost<\/p>\n<p>&nbsp;<\/p>\n<p>Install wordpress<\/p>\n<p>&nbsp;<\/p>\n<p>Modify wp-config<\/p>\n<p>\/** sets up &#8216;direct method for wordpress auto-update without install in ftp **\/<\/p>\n<p>define(&#8216;FS_METHOD&#8217;,&#8217;direct&#8217;);<\/p>\n<p>&nbsp;<\/p>\n<p>https:\/\/wordpress.org\/support\/topic\/auto-upgradeupdate-on-mac-os-x<\/p>\n<pre><code>$ cd \/&lt;wherever&gt;\/Sites\/&lt;thesite&gt;\n$ sudo chown -R _www wordpress\n\n<\/code><\/pre>\n<p class=\"p1\">Here&#8217;s a simple option that gives you full (read+write) access, lets the webserver read the files, and locks everyone else out of the web folder<\/p>\n<p class=\"p1\"><span class=\"s1\">$ sudo chown -R &#8220;username&#8221;:_www \/www\/home\/wp-content<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">$ chmod -R u=rwX,g=rX,o= \/www\/home\/wp-content<\/span><\/p>\n<p class=\"p1\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I started this post back in August 2016 when I set my old Mac mini up as a media server and webserver for testing purposes. I never finished it or got back to it, which is a bit of a bummer since it is all just so much gobbledygook to me now. Still, it documents [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/posts\/10600"}],"collection":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10600"}],"version-history":[{"count":0,"href":"https:\/\/macblaze.ca\/index.php?rest_route=\/wp\/v2\/posts\/10600\/revisions"}],"wp:attachment":[{"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/macblaze.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}