作者:yushun | 来源:互联网 | 2023-10-10 13:14
InmyApachewebserverIputthis:在我的Apache网络服务器中,我把它:<DirectoryvarwwwMYDOMAIN.comhtdocs&
In my Apache webserver I put this:
在我的Apache网络服务器中,我把它:
SetHandler mod_python
PythonHandler mod_python.publisher
PythonDebug On
Then I have a handler.py file with an index function.
然后我有一个带索引函数的handler.py文件。
When I go to MYDOMAIN.com/handler.py, I see a web page produced by the index function (just a plain vanilla HTML page). Every other page is of this type: MYDOMAIN.com/handler.py/somename where somename corresponds to a funcion in handler.py file.
当我访问MYDOMAIN.com/handler.py时,我看到索引功能生成的网页(只是一个简单的vanilla HTML页面)。每个其他页面都是这种类型:MYDOMAIN.com/handler.py/somename其中somename对应于handler.py文件中的一个函数。
But when I go to MYDOMAIN.com, I get this:
但是当我去MYDOMAIN.com时,我得到了这个:
Not Found
The requested URL / was not found on this server.
在此服务器上找不到请求的URL /。
Is theres a way with mod_python and publisher to just use the root and not a name.py as a starting point?
是不是mod_python和发布者只使用root而不是name.py作为起点?
I already tried with this in the apache conf file:
我已经在apache conf文件中尝试过这个:
DirectoryIndex handler.py
To no avail :(
无济于事:(
2 个解决方案