New Testing Server 2016
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.
Set up Server
https://mallinson.ca/osx-web-development/
Enable Root user
Directory Utility
Edit–>Enable Root User
MySQL : http://dev.mysql.com/downloads/mysql/
Apache
sudo apachectl start
sudo apachectl restart
/private/etc/apache2/httpd.conf
PHP
117 LoadModule php5_module libexec/apache2/libphp5.so
220
221 AllowOverride none
222 Require all denied
223
160 LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
477 Include /private/etc/apache2/extra/httpd-vhosts.conf
httpd-vhosts.conf file in the /private/etc/apache2/extra/
ServerAdmin info@macblaze.ca
DocumentRoot “/www/home/”
ServerName 192.168.1.10
ErrorLog “/private/var/log/apache2/home.macblaze.ca-error_log”
CustomLog “/private/var/log/apache2/home.macblaze.ca-access_log” common
IP to LocalHost
sudo nano /etc/hosts
Add the Domain and ‘www‘ alias to resolve to the localhost address
127.0.0.1 apple.com www.apple.com
sudo apachectl restart
Text Wrangler
http://www.barebones.com/products/textwrangler/download.html
Command Line tools
Set up A record for subdomain
FTP Server
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
Open up router to forward port 80 to localhost
Install wordpress
Modify wp-config
/** sets up ‘direct method for wordpress auto-update without install in ftp **/
define(‘FS_METHOD’,’direct’);
https://wordpress.org/support/topic/auto-upgradeupdate-on-mac-os-x
$ cd /<wherever>/Sites/<thesite>
$ sudo chown -R _www wordpress
Here’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
$ sudo chown -R “username”:_www /www/home/wp-content
$ chmod -R u=rwX,g=rX,o= /www/home/wp-content