Peter Tsung
Peter Tsung

Reputation: 935

some wrongs when i start the server using service httpd restart

when i ran service httpd restart i got the response shown that

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

I guessed that might be the yigu.conf's problem, here's my yigu.conf file in /alidata/server/httpd/conf/vhosts

<VirtualHost *:80>
    ServerName www.xxx.com
    ServerAlias localhost
    ServerAdmin [email protected]

    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>

I just follow the Django's document and wrote down that code. Then i ran yum install libapache2-mod-wsgi And the result was

Loaded plugins: langpacks
No package libapache2-mod-wsgi available.

Then i tried sudo apt-get libapache2-mod-wsgi The result was sudo: apt-get: command not found

I was scared..everything was out of my control..Anyone could give me a hand ?

Upvotes: 0

Views: 34

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599470

Presumably you are on CentOS, the package is just called mod_wsgi:

yum install mod_wsgi

Upvotes: 1

Related Questions