Include /private/etc/apache2/users/*.confĪlmost there, hang on with me. Then go to edit /etc/apache2/extra/nf and uncomment the following, save and exit. Save and quit with control + x, it will prompt you to save, just respond with “Y” which represent Yes then enter. LoadModule php7_module libexec/apache2/libphp7.so LoadModule userdir_module libexec/apache2/mod_userdir.so Include /private/etc/apache2/extra/nf You may open up the file with sudo nano nf. Uncomment the following line in /etc/apache2/nf by removing the #. Now, we have to enable personal website by editing the apache config file. You need to put your project folder in Sites, your directory should look something like this. There is a default directory called Sites, locate in User directory. Well, let me share some simple steps of setup. Since it is your local machine, so it is called localhost. The concept is to use your laptop or computer, a machine to serve your PHP code. -t public : Target to public folder (only for Laravel framework).127.0.0.1 : location to serve the server.-S : Flag that tell shell to serve a server.php : It is the command header to let shell understood you are calling php command.This is a command that we type and enter in terminal(Mac) or command prompt(windows) to initiate a localhost server for your PHP project. If you’re new to PHP, you probably using this method state above. So I’m going to show you how to serve PHP in your localhost environment, and speed up the development. Therefore, there is a needs to ease PHP developer life with rapid development tools. Over 70% of websites used PHP as the backbone. PHP is a programming language that is widely used for web development.
0 Comments
Leave a Reply. |