If you installed MySql via another method, you can use mysql_config -socket You can use a tool like MySQL Workbench to see currently running mysqlĬheck currently running mysql instances with $ps aux | grep mysql You will find it in system preferences > mysql Normally, you can just install the native mysqld service ![]() WSGIScriptAlias /devsiteWsgiApp "/Users/123/Dropbox/hosts/devsite/wsgiapp.py" WSGIDaemonProcess devsite processes=2 threads=15 Options Indexes FollowSymLinks Includes ExecCGI XSendFilePath "/Users/123/Dropbox/hosts/devsite" You can just access /private/etc/apache2/nf and add: ĭocumentRoot "/Users/123/Dropbox/hosts/devsite" You can add unlimited virtual hosts just like MAMP adds them. You can for example first edit the config upload_max_filesize = 32M Make sure DirectoryIndex includes php php config If you are not allowed to add modules -> create signing authority -> create code signing authority -> codesign -sign "Mohd Shakir" -force -keychain ~/Library/Keychains/login.keychain-db /opt/homebrew/opt/php/lib/httpd/modules/libphp.so Remember to uncomment LoadModule rewrite_module libexec/apache2/mod_rewrite.so and add AddType application/x-httpd-php. LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so Start the server /opt/homebrew/bin/httpd -k start install php brew unlink php & brew link -overwrite -force this in your conf file inside apache configuration ( use /opt/homebrew/bin/httpd -V to find the configuration file ) LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so You can check the config syntax with httpd -tĬheck which services use port 80 sudo lsof -i -P | grep LISTENĪccess the config from /private/etc/apache2/nf # /opt/homebrew/etc/httpd/nf ( homebrew ) -> remember to change the User and Group to your user and group settingsĪlso, remember to allow vhost_alias_module LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so Then you can do $/opt/homebrew/opt/httpd/bin/httpd -V To check if you have httpd running you can do ps -ef |grep httpd ps -ef |grep httpdĠ 4182 1 0 Mon01PM ? 0:01.16 /Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/nf -k startĥ01 4183 4182 0 Mon01PM ? 0:00.00 /Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/nf -k startĥ01 4189 4182 0 Mon01PM ? 0:00.02 /Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/nf -k startĥ01 24659 24648 0 12:33AM ? 0:00.00 /opt/homebrew/opt/httpd/bin/httpd -D FOREGROUNDĥ01 24661 24648 0 12:33AM ? 0:00.01 /opt/homebrew/opt/httpd/bin/httpd -D FOREGROUNDĥ01 24662 24648 0 12:33AM ? 0:00.00 /opt/homebrew/opt/httpd/bin/httpd -D FOREGROUND Sudo launchctl unload -w /System/Library/LaunchDaemons/ 2>/dev/null ![]() Optional, if you are on Mac OS X Monterey you might need to uninstall the default Apache 2.4 sudo apachectl stop You just need to start it: sudo apachectl start restart: sudo apachectl restart check config: apachectl configtest You can use the following command for this and follow the instructions.You should already have Apache installed on mac Install Apache This means performing some configurations such as verifying created passwords (length, special characters, uppercase and lowercase letters), removing anonymous users, disabling remote login, and deleting test databases. Once this is done, the next step will be to secure the installation. LoadModule php7_module MySQL Installation brew install mysql ![]() You must configure this line in the /opt/homebrew/etc/httpd/nf file. Subsequently, during the PHP installation, you should have received a message to configure the library in Apache. To do this, you must first find the following lines Install several versions of PHP on MacOS 12 (Monterey) Configure Apache with PHPĪfter this, you must configure Apache to work with PHP. For this, you can review our next article. The next step would be to install PHP in any of its supported versions. Install and configure Apache on MacOS 12 (Monterey) PHP Installation For this, you can review our article exclusively dedicated to this installation. If you are a developer or need to set up a project developed in PHP with Apache and MySQL, this article will guide you step by step to the necessary configuration packages. MacOS is an excellent operating system for developing web applications.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |