InUbuntu 9.04Under ConfigurationApacheAndMod-Python
Directly use the Package Manager for InstallationApache, Browser accessLocalhost,ApacheReturn"It works !".
Directly use the Package Manager for InstallationMod-Python, ReferUBUNTU ForumThis post configuration
Http://ubuntuforums.org/showthread.php? T = 91101
If the first step is suspected to have been done by the Software Package Manager, directly modify the configuration file:
CD/etc/apache2/sites-available/
Sudo gedit default
ModifyVar/WWWConfiguration:
Bytes ------------------------------------------------------------------------------------
<Directory/var/www/>
Options indexes followsymlinks Multiviews
AllowOverride authconfig
Order allow, deny
Allow from all
Addhandler mod_python. py
Pythonhandler mod_python.publisher
Pythondebug on
# Uncomment this directive is you want to see apache2's
# Default start page (in/apache2-default) when you go/
# Redirectmatch ^/$/apache2-default/
</Directory>
Bytes ------------------------------------------------------------------------------------
InVar/WWWCreate a folderTest. py, Content:
Bytes ------------------------------------------------------------------------------------
Def index (req ):
Return "test successful ";
Bytes ------------------------------------------------------------------------------------
Browser accessLocalhost/test. py. The test is successful.
use non- root User Logon, cannot be directly modified WWW file, sudo gedit , very uncomfortable. First, go to System - preference - users and groups" to root unlock. Log on to the "Logon Service - Security" allows the local administrator to log on.
Reboot and I don't knowRootPassword ......
searched Ubuntu default root password, solution: Ubuntu default root password .
FirstSudo passwd, Enter the original administrator password, and then enter the new password twice. Then you can use the new password to log on.Root.
Reboot, login successfulRoot.