2013-02-22 107 views
-1

我在Ubuntu中設置我的apache2服務器時遇到問題。Apache2安裝程序Ubuntu

我做了一個sudo apt-get install,它安裝正常。訪問本地主機時,我能夠看到該網站正在工作。

然後我不確定發生了什麼,但我不再能夠看到「它的工作!」網站。當我嘗試重新啓動apache2時,它會返回:

Syntax error on line 17 of /etc/apache2/sites-enabled/000-default: 
AddHandler requires at least two arguments, a handler name followed by one or more file extensions 
Action 'configtest' failed. 
The Apache error log may have more information. 
...fail! 

任何想法?

這裏是/ 000默認我的/ etc/apache2的/啓用的站點 - :

的ServerAdmin網站管理員@本地

DocumentRoot /var/www 
<Directory /> 
    Options FollowSymLinks 
    AllowOverride None 
</Directory> 
<Directory /var/www/> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride None 
    Order allow,deny 
    allow from all 

    DirectoryIndex index.html index.py 

    AddHandler mod_python.py 
    PythonHandler mod_python.publisher 
    PythonDebug On 
</Directory> 

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 
<Directory "/usr/lib/cgi-bin"> 
    AllowOverride None 
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
    Order allow,deny 
    Allow from all 
</Directory> 

ErrorLog ${APACHE_LOG_DIR}/error.log 

# Possible values include: debug, info, notice, warn, error, crit, 
# alert, emerg. 
LogLevel warn 

CustomLog ${APACHE_LOG_DIR}/access.log combined 

+1

你可以給我們你的/ etc/apache2/sites-enabled/000-default嗎? – Ifnot 2013-02-22 12:58:47

回答

0

上有你的配置文件有問題。嘗試改變行14:

AddHandler mod_python .py