newbie question - start page configuration
I am new to zope and have gone through the tutorial and now what I wonder is how to change the address of my page from; http://mypage.com:8080/Examples/mynewpage to simply http://mypage.com:8080 I know I can lose the 8080 part in the configuration file by changing the port to 80. What about the subdirectory part? __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
Here's two ways. Someone will probably have a better suggestions. 1) Put a python script in your root folder to redirect to your target object. Something like: container.REQUEST.RESPONSE.redirect("/Examples/mynewpage") or container.REQUEST.RESPONSE.redirect(container.Examples.mynewpage.absolute_ur l()) This has the disadvantage of exposing the real URL to the end user. Perhaps you don't care, perhaps you do. 2) Put it behind apache and use VirtualHostMonster. This is more complicated, but it can make "/Examples" appear and act as your site root. It can also help guard against DoS attacks.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Dave Banning Sent: Monday, July 29, 2002 5:02 PM To: zope@zope.org Subject: [Zope] newbie question - start page configuration
I am new to zope and have gone through the tutorial and now what I wonder is how to change the address of my page from;
http://mypage.com:8080/Examples/mynewpage
to simply
I know I can lose the 8080 part in the configuration file by changing the port to 80. What about the subdirectory part?
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
object. Something like:
container.REQUEST.RESPONSE.redirect("/Examples/mynewpage")
or
container.REQUEST.RESPONSE.redirect(container.Examples.mynewpage.absolute_ur l())
Is this put in the z2.py configuration file?
2) Put it behind apache and use VirtualHostMonster. This is more complicated, but it can make "/Examples" appear and act as your site root.
Do you mean in httpd.conf where the virtual hosts are configured, say in my case, like; <VirtualHost *> DocumentRoot /usr/local/www/data ServerName skytrackercanada.com </VirtualHost> if so, this is not an http address. Can I direct DocumentRoot to a specific directory like with apache, and Zope will execute it? If so what directory would ./Examples/myprograms fall under?
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Dave Banning Sent: Monday, July 29, 2002 5:02 PM To: zope@zope.org Subject: [Zope] newbie question - start page configuration
I am new to zope and have gone through the tutorial and now what I wonder is how to change the address of my page from;
http://mypage.com:8080/Examples/mynewpage
to simply
I know I can lose the 8080 part in the configuration file by changing the port to 80. What about the subdirectory part?
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
-----Original Message----- From: Dave Banning [mailto:sky_tracker@yahoo.com] Sent: Monday, July 29, 2002 6:02 PM To: Charlie Reiman; zope@zope.org Subject: RE: [Zope] newbie question - start page configuration
object. Something like:
container.REQUEST.RESPONSE.redirect("/Examples/mynewpage")
or
container.REQUEST.RESPONSE.redirect(container.Examples.mynewpage.a bsolute_ur
l())
Is this put in the z2.py configuration file?
No. A python script object called 'index_html' in your root folder. This will then act as the default document when you fetch "/", resulting in a swift redirect.
2) Put it behind apache and use VirtualHostMonster. This is more complicated, but it can make "/Examples" appear and act as your site root.
Do you mean in httpd.conf where the virtual hosts are configured, say in my case, like;
<VirtualHost *> DocumentRoot /usr/local/www/data ServerName skytrackercanada.com </VirtualHost>
No. You need to do some mod_proxy voodoo. It has nothing to do with apache's virtual hosts. Add a VirtualHostMonster object to your zope in the root folder and read the docs. It's quite harmless. There is also some docs in the usual places: zope.org, zopelabs, etc.
if so, this is not an http address.
Can I direct DocumentRoot to a specific directory like with apache, and Zope will execute it? If so what directory would ./Examples/myprograms fall under?
Not that I've found. Perhaps it is possible but I've never done it.
participants (2)
-
Charlie Reiman -
Dave Banning