Configure Apache and mod-python in Ubuntu 9.04

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.