Once you make the Sites folder you will notice that it has a unique icon which is a throwback from a few versions older.
You need to make a " Sites" folder at the root level of your account and then it will work. This takes a bit longer to set up but some users are very accustomed to using it. The other web root directory which is missing by default is the ' ~/Sites' folder in the User account. The files are shared in the filing system at - /Library/WebServer/Documents/ User Level Root the default system document root is still found at. It is easier to use the user level one as you don't have to keep on authenticating as an admin user. It seems there is less effort from Apple in continuing with the user level one but it still can be set up with a couple of extra tweaks in configuration files. Document Rootĭocument root is the location where the files are shared from the file system and is similar to the traditional names of ' public_html' and ' htdocs', macOS has historically had 2 web roots one at a system level and one at a user level - you can set both up or just run with one, the user level one allows multiple accounts to have their own web root whilst the system one is global for all users. This will give you an indication of what might be wrong. If you don't get the localhost test, you can try troubleshooting Apache to see if there is anything wrong in its config file by running apachectl configtest The Apache version that comes in macOS Big Sur is Apache/2.4.46Īfter starting Apache - test to see if the webserver is working in the browser - you should see the "It Works!" text. To start Apache web sharing sudo apachectl start
Using the prefix of sudo is required for commands that have their applications protected in specific folders - when using sudo you will need to confirm with your admin password or iCloud password if set up that way. Thrown in /var/This needs to be done in the Terminal which is found in the OS filing system at /Applications/Utilities/Terminalįor those not familiar with the Terminal, it really isn't as intimidating as you may think, once launched you are faced with a command prompt waiting for your commands - just type/paste in a command and hit enter, some commands give you no response - it just means the command is done, other commands give you feedback. PHP Fatal error: Uncaught Error: Class ‘MongoClient’ not found in /var/www/html/mongo/mongo.php:3 “_id” : ObjectId(“5d5a969006e247a47fe2dc88”),īut while I am going to connect with PHP7.2 using below code: └─25309 /usr/bin/mongod –unixSocketPrefix=/run/mongodb –config /etc/nfĪug 19 20:25:31 user systemd: Started An object/document-oriented database.Īfter that I have create DB and insert one record for test result are as below: Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (running) since Mon 20:25:31 IST 59s ago rvice – An object/document-oriented database.To read that post, click on the link below:
We have written a great tutorial on how to install and configure MongoDB on Ubuntu Linux. To test Apache2 setup, open your browser and browse to the server hostname or IP address and you should see Apache2 default test page as shown below. sudo apt updateĪfter installing Apache2, the commands below can be used to stop, start and enable Apache2 service to always start up with the server boots. To install Apache2 HTTP server on Ubuntu, run the commands below. When you’re ready to get MongoDB setup on Ubuntu with Apache2 and PHP support, continue with the steps below: How to install Apache on Ubuntu Linux Ubuntu is the modern, open source Linux operating system for desktop, servers and other devices. Also, for students and new users learning Linux, the easiest place to start learning is on Ubuntu Linux.