Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 46794  / 3 Years ago, sat, june 26, 2021, 5:41:03

I am a php programmer and new in ubuntu. Now I am using ubuntu 12.4 I need to create public html directory on my home directory for easy assess of php files. How can I create this public_html directory on my home folder. And how it configure as a apache server for run php scripts?


More From » apache2

 Answers
1

Apache comes with userdir module which lets you use /home/USER/public_html as root directory.



You will access this public_html as localhost/~USER/



You may need to enable userdir, if not enabled, which is done by:



sudo a2enmod



By default Apache uses /var/www as document root.



Or you can create a virtualhost with your specific document root as well.



https://help.ubuntu.com/lts/serverguide/httpd.html


[#28056] Monday, June 28, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ibuteking

Total Points: 35
Total Questions: 128
Total Answers: 138

Location: Indonesia
Member since Thu, Oct 1, 2020
4 Years ago
;