Enable Userdir2010/07/24 |
Enable userdir, users can build websites with this config. |
|
[1] | Configure for Userdir |
root@www05:~# a2enmod userdir Enabling module userdir. Run '/etc/init.d/apache2 restart' to activate new configuration! root@www05:~# vi /etc/apache2/mods-enabled/userdir.conf # line 6,7: change AllowOverride All Options ExecCGI root@www05:~# vi /etc/apache2/mods-enabled/php5.conf # line 13: make it comment # php_admin_value engine Offroot@www05:~# /etc/init.d/apache2 restart * Restarting web server apache2 ... waiting ...done. |
[2] | Create a CGI test page with a user and access to it with web browser. It's OK if following page is shown. |
lucid@www05:~$ mkdir public_html lucid@www05:~$ cd public_html lucid@www05:~/public_html$ vi index.cgi #!/usr/local/bin/perl print "Content-type: text/html\n\n"; print <<"EOM"; <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> CGI Test page </div> </body> </html> EOM exit; lucid@www05:~/public_html$ chmod 705 index.cgi |
[3] | Create a PHP test page with a user and access to it with web browser. It's OK if following page is shown. |
lucid@www05:~/public_html$ vi index.php <html>
<body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;"> <?php print Date("Y/m/d"); ?> </div> </body> </html> |
Sponsored Link |