当我跑AH00526: Syntax error on line 12 of /alidata/server/httpd/conf/vhosts/yigu.conf:
Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration
时,我得到的回复显示
/alidata/server/httpd/conf/vhosts
我猜这可能是yigu.conf的问题,这里是<VirtualHost *:80>
ServerName www.xxx.com
ServerAlias localhost
ServerAdmin 123@123.com
Alias /static/ /root/dict/static/
<Directory /root/dict/static>
Require all granted
</Directory>
WSGIScriptAlias / /root/dict/dict/wsgi.py
WSGIPythonPath /root/dict/
<Directory /root/dict/dict>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
yum install libapache2-mod-wsgi
我只是按照Django的文档写下代码。
然后我跑了Loaded plugins: langpacks
No package libapache2-mod-wsgi available.
结果是
sudo apt-get libapache2-mod-wsgi
然后我尝试了sudo: apt-get: command not found
结果是{{1}}
我很害怕......一切都超出了我的控制范围。任何人都可以帮我一把?
答案 0 :(得分:1)
据推测,您使用的是CentOS,该软件包名为mod_wsgi
:
yum install mod_wsgi