2
我正在爲家建立一個服務器來運行各種各樣的事情。我會爲你保存整個故事,但我試圖讓它通過WSGI運行Web2Py,但也需要爲我擁有的其他Web應用程序提供PHP文件。我嘗試了Web2Py的安裝腳本,但是「劫持」了整個Apache系統來運行Web2Py系統。用於PHP和Web2Py的Apache配置
該設置當前適用於PHP和SSL頁面,但我無法讓它處理Web2Py網站的請求。對於Web2Py url(http://jupiter/web2py
),我得到一個Apache目錄列表。請幫忙。
的目錄結構是這樣的:
- /無功/網絡 - >的Apache的DocumentRoot
- /無功/網絡/腳本 - >各種PHP腳本
- /無功/網絡/的web2py - - > web2py的
在/ etc/apache2的/網站可用/默認文件設置爲這樣的:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName jupiter.myhome.com
WSGIDaemonProcess web2py user=www-data group=www-data display-name=%{GROUP}
WSGIProcessGroup web2py
WSGIScriptAlias /web2py /var/www/web2py/wsgihandler.py
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow, deny
allow from all
</Directory>
<Directory /var/www/web2py>
AllowOverride None
Order Allow,Deny
Deny from all
<Files wsgihandler.py>
Allow from all
</Files>
</Directory>
AliasMatch ^/([^/]+)/static/(.*) /var/www/web2py/applications/$1/static/$2
<Directory /var/www/web2py/applications/*/static/>
Order Allow,Deny
Allow from all
</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
#comment
#comment
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined