理想行为
我希望能够访问RockMongo at localhost/rockmongo。
电流行为
我得到了:
Error: 404 Not Found
Sorry, the requested URL 'http://localhost/rockmongo' caused an error:
Not found: '/rockmongo'环境
mod_wsgivirtualenv/etc/apache2/sites-available/000-default.conf
WSGIPythonHome /var/www/html/ENV
WSGIPythonPath /var/www/html:/var/www/html/ENV/lib/python2.7/site-packages:/var/www/html/wsgi
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
WSGIScriptAlias / /var/www/html/wsgi/application
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>目录权限
/var/www
drwxr-xr-x 3 root root 4096 Nov 23 08:58 www/var/www/html
drwxr-xr-x 10 me me 4096 Nov 26 23:46 html/var/www/html/rockmongo
drwxr-xr-x 5 me me 4096 Jun 6 23:04 rockmongoApache错误日志
没有与此有关的错误。
发布于 2014-11-26 15:45:58
我让它正常工作,但我很想确认这是正确的方法,不会给RockMongo造成任何安全问题,也不会干扰mod_wsgi功能的其他方面。
我在下面添加了Alias行和Directory块。
/etc/apache2/sites-available/000-default.conf
WSGIPythonHome /var/www/html/ENV
WSGIPythonPath /var/www/html:/var/www/html/ENV/lib/python2.7/site-packages:/var/www/html/wsgi
<VirtualHost *:80>
# for all content in static folder - css, js, img, fonts
Alias /static/ /var/www/html/wsgi/static/
# for rockmongo
Alias /rockmongo /var/www/html/rockmongo
<Directory /var/www/html/rockmongo>
Order deny,allow
Allow from all
</Directory>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
WSGIScriptAlias / /var/www/html/wsgi/application
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>https://stackoverflow.com/questions/27151360
复制相似问题