8. Create a directory for users (personal pages) of the machine
To ensure that each system user has a space to host their web pages, you need to configure Apache in the file
Code:
/ Etc/apache2/apache2.confusing
using vim or any other editor which you like and this as root (control su) Locate the following lines:
Code:
# UserDir Is Now a module # UserDir public_html # UserDir disabled root
# <Directory /home/*/public_html> # AllowOverride FileInfo AuthConfig Limit
# Options Indexes # SymLinksIfOwnerMatch IncludesNOEXEC </Directory>
Uncomment all and then store at
Code:
# UserDir Is Now a module UserDir public_html UserDir disabled root
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit
Options Indexes SymLinksIfOwnerMatch IncludesNOEXEC </Directory>
For the changes to take effect, we will have to restart the Web server using the command
Code:
/Etc/init.d/apache2 restart
Run this command in the terminal as a root user. Now every user has the ability to implement its own homepage. For this, they simply create a directory name public_html, his home directory. The directory should at least be running for the other group and owner. The directory public_html must be readable by everyone.
Code:
$ cd / home / test /
$ mkdir public_html
$ chmod 755 public_html /
$ chmod o + x. /
$ cd public_html
$ cat> index.php <?php phpinfo(); ?>
CTRL + D to end of file
From now on, personal Web space is available from the address
Code:
http://127.0.0.1/ ~ user /
Or in the case of the example above
Code:
http://127.0.0.1/ test ~ /
9. Conclusion
I hope this tutorial will help you. If you are going to use these software's that is Apache, MySql, PHP on GNU/Linux Debian system, then you will get a great performance from your web server. GNU/Linux Debian is very well know for its stability.
Bookmarks