hasemauthority.blogg.se

Mac os x apache change root directory
Mac os x apache change root directory





  1. MAC OS X APACHE CHANGE ROOT DIRECTORY FOR MAC OS X
  2. MAC OS X APACHE CHANGE ROOT DIRECTORY INSTALL

Mysql> CREATE USER IDENTIFIED BY 'moodle' Sudo /usr/local/mysql/support-files/rver restartĬreate moodle MySQL user, database and grant privileges Sudo /usr/local/mysql/support-files/rver stop Sudo /usr/local/mysql/support-files/rver start Mysql Ver 8.0.13 for macos10.14 on x86_64 (MySQL Community Server - GPL) bash_profile file you opened to editĮxport PATH="$:/usr/local/mysql/bin" bash_profile (if you are using bash)Īdd path to mysql at the end of.

MAC OS X APACHE CHANGE ROOT DIRECTORY INSTALL

If you are not running OSX Server then you will probably need to install Mysql again if Apple issues an upgrade of Yosemite.Īfter MySQL dmg installation if there is an issue with the MySQL PATH when mysql commands are run, add PATH to. If you tick the option to start on boot then it may not actually start on boot. The dmg install will allow you to start or stop the MySql server from your system preferences. The most likely error will be a page just showing the text which means php is not working.ĭownload your version of Mysql from the Mysql site and install it! This should give you the well known phpinfo page.

MAC OS X APACHE CHANGE ROOT DIRECTORY FOR MAC OS X

Make a file in the root of your webfolder ( The default DocumentRoot for Mac OS X Yosemite is /Library/WebServer/Documents ) called phpinfo.php and add this content. In the finder, choose the folder and using the get info dialogue to give _www write access to the folder. The default Apache user is "_www" and so your /moodledata folder needs write permissions for the _www user. Restart apache for the changes to take effectĪpache user permissions on /moodledata folder LoadModule php7_module libexec/apache2/libphp7.so If you have PHP 7 then php module would be Since Moodle 3.3 minimum PHP version is 7.0.0 with PHP 7.1.x and 7.2.x also supported. LoadModule php5_module libexec/apache2/libphp5.so LoadModule userdir_module libexec/apache2/mod_userdir.so LoadModule authz_host_module libexec/apache2/mod_authz_host.so LoadModule authz_core_module libexec/apache2/mod_authz_core.so In /etc/apache2/nf uncomment all the following lines Pick up a url you would use locally for moodle site, for example '', and add to the bottom of the nf fileĭocumentRoot "/Users/mac_user_you_are_logged_in/Sites/moodle/"Īdd a url for a local moodle site, the same as in nf, to the bottom of /etc/hostsĪfter moodle set up you should be able to point a browser to

  • DocumentRoot "/Library/WebServer/Documents"ĭocumentRoot "/Users/mac_user_you_are_logged_in_with/Sites/".
  • $ sudo cp /etc/apache2/nf /etc/apache2/Ĭhange DocumentRoot to point to /Sites folder and uncomment nf Backup your nf, just in case, then open nf to make some changes Also create folders for moodle and moodledata inside /Sites folder.Ĭonfigure Apache to point to /Sites directory. If you want to set up /Sites folder, which is one of possible setups, and there is no /Sites folder on your mac, create one. Options Indexes MultiViews FollowSymLinks Don’t forget to change for your username. Mac users are used to having a /Sites folder which publishes a local-users web site on cd /etc/apache2/users $ netstat -an | grep '.80' | grep -i LISTEN To check port 80 with netstat (with approximate output) In case of issues to verify that apache is running search for httpd process (with approximate output) If you see a message saying " It Works!!", then apache is working correctly. Sudo launchctl load -w /System/Library/LaunchDaemons/ If you want apache to start on boot then issue this command Since Apache is already installed you need to start it and to confirm it works. Since Mac OS X Yosemite Apache and PHP come packaged with the OS so you only need to enable PHP and install MySQL If you are doing any kind of development on an mac then consider an installation of XCode (you can get this from the app store) which will install all sorts of odds and ends that you are likely to need now and then such as libraries for php etc. e.g sudo nano /etc/apache2/nf or sudo vi /etc/apache2/nf Mostly you need to be root to edit the files so precede your editor name by sudo. Most of this work is via the cli which you can use in the ‘terminal’ application. Also Apple does not cooperate with your changes when upgrading the OS. The OS X install described here is essentially the same as a Linux install and so the advice there can be applied here. This page is for people who want to do an OSX install without using someone else's packaging.Ī native install of Moodle on an OSX machine is not really suitable as an internet linked live server but it is great for testing and development.
  • 5.1 Apache user permissions on /moodledata folder.
  • 4.1 Apache configuration for /Sites folder.
  • 1 Yosemite and above native OSX install.






  • Mac os x apache change root directory