These are the steps which i have followed:
- Activated the apache server in the terminal as a root user.
Input:
> apachectl start
Output:
Output in browser:it work’s - configured the httpd.conf file in /etc/apache2 folder
- updated the servername to localhost in httpd.conf file
- Now i changed directory to as below command:
> cd /Library/WebServer/Documents/ - in that documents folder i applice chmod 777 /Library/WebServer/Documents/
- now i created a Sites folder in Home folder
- created a index.html file in the Sites folder
- now i configured the apache server in terminal
- i opened httpd.conf file in nano editor using command
sudo nano /etc/apache2/httpd.conf
10. Uncommented the these lines
LoadModule userdir_module libexec/apache2/mod_userdir.so
Include /private/etc/apache2/extra/httpd-userdir.conf
11. i opened httpd-userdir.conf file in nano editor using command
sudo nano /etc/apache2/extra/httpd-userdir.conf
12. Uncommented the line
Include /private/etc/apache2/users/*.conf
13. Now i changed directories to /etc/apache2/users using following command
cd /etc/apache2/users
14. created file kadiyamanudeep.conf in users folder
15. Entered following text in the configure file:
<Directory “/Users/kadiyamanudeep/Sites/”>
Options Indexes Multiviews
AllowOverride None
Require all granted
16. Restarted apache server
17. i am getting http403 forbidden error instead of kadiyamanudeep directory in browser
Input in browser: localhost/~kadiyamanudeep
Output: enter image description here
i tried to config the apache server which is inbuilt in macbook
and tried to open sites folder in browser.
i am expecting sites folder in browser