让Ubuntu服务器网站支持Py文件
让Ubuntu服务器网站支持Py文件:
首先安装:
$ sudo apt-get install libapache2-mod-python
配置:
$ sudo vi /etc/apache2/sites-available/default
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
加入红色字的三行。
重启Apache2就可以了:
$ sudo /etc/init.d/apache2 retstart
相关推荐
changecan 2020-11-19
sunnnyduan 2020-10-16
lonesomer 2020-09-17
houdaiye 2020-09-23
XPZ0 2020-09-22
changecan 2020-09-22
jackadmi 2020-09-11
yuan00yu 2020-08-24
yserver 2020-08-15
liyansring 2020-08-15
liai 2020-08-09
山有木兮卿有意 2020-08-03
85206633 2020-07-28
suosuo 2020-07-28
83911930 2020-07-28
85590296 2020-07-22
liym 2020-07-20