On 29-Feb-04, at 11:52 AM, Patrick Kirk wrote:
Hi Murray,
I've never used OpenBSD but when installing from Ports can you specify that Apache be compiled with mod_proxy and mod_rewrite support? That's the first essential.
Not sure... but I'll just install the latest (2.0.48) from source anyway. Actually, it just finished the "make install" step a few seconds ago! :^) I decided to statically include mod_proxy and mod_rewrite, as they will be used in every 'real' request anyhow.
If you like to compile from source, I've a Configuration.tmpl that has the essential edits done attached but obviously it makes more sense to edit your own copy to your own satisfaction.
Here's what I used: -bash-2.05b$ sudo ./configure --prefix=/var/www --enable-rewrite --enable-proxy
To see if Apache's already got that support simply enter the command 'httpd -l' at the command line.
Bingo! -bash-2.05b$ /var/www/bin/httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c mod_proxy.c proxy_connect.c proxy_ftp.c proxy_http.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_rewrite.c mod_so.c
Once you are sure that both mod_rewrite and mod_proxy support are present, its really very easy to configure httpd.conf and Zope but let us know when you've verified getting to that stage.
Here I am! :^D What are the essential changes required to httpd.conf? There are about a half-dozen virtual domains at the moment. Thanks again! You guys are awesome. M
OK. I'd be grateful if others on the list would read this as well to provide a sanity check. Step 1: Put a Virtual Host Monster in your Zope root folder. Give it a unique id but it really doesn't matter what you call it. Step 2: Let us assume you have a site called http://www.buystuff.com served from a folder called "buystuff" in your root directory and a site called http://www.mycause.org is served from "mycause" folder. Lets also assume your IP is 111.111.111.111 and Zope is on port 8081 with Apache on port 80. Step 3: The virtual hosts section for www.buystuff.com will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.buystuff.com ErrorLog logs/www.buystuff.com-error_log CustomLog logs/www.buystuff.com-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.buystuff.com:80/buystuf... [NC,L,P] </VirtualHost> Step 4: The virtual hosts section for www.mycause.org will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.mycause.org ErrorLog logs/www.mycause.org-error_log CustomLog logs/www.mycause.org-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.mycause.org:80/mycause/... [NC,L,P] </VirtualHost> Apart from the [NC,L,P] this is from the virtual host monster documentation. And others on this list gave me them! Step 5: Run the command "apachectl configtest" and it will tell you if there are any syntax errors without requiring you to restart apache and find out the hard way you've put a comma in the wrong place. Step 6: Run "apachectl restart" and your sites should now be served from Zope through Apache. And the beauty of it is that it just works. If you have any problems, let us know. Best regards, Patrick Kirk Mobile: 07876 560 646 Murray Pearson wrote:
On 29-Feb-04, at 11:52 AM, Patrick Kirk wrote:
Hi Murray,
I've never used OpenBSD but when installing from Ports can you specify that Apache be compiled with mod_proxy and mod_rewrite support? That's the first essential.
Not sure... but I'll just install the latest (2.0.48) from source anyway. Actually, it just finished the "make install" step a few seconds ago! :^) I decided to statically include mod_proxy and mod_rewrite, as they will be used in every 'real' request anyhow.
If you like to compile from source, I've a Configuration.tmpl that has the essential edits done attached but obviously it makes more sense to edit your own copy to your own satisfaction.
Here's what I used: -bash-2.05b$ sudo ./configure --prefix=/var/www --enable-rewrite --enable-proxy
To see if Apache's already got that support simply enter the command 'httpd -l' at the command line.
Bingo!
-bash-2.05b$ /var/www/bin/httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c mod_proxy.c proxy_connect.c proxy_ftp.c proxy_http.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_rewrite.c mod_so.c
Once you are sure that both mod_rewrite and mod_proxy support are present, its really very easy to configure httpd.conf and Zope but let us know when you've verified getting to that stage.
Here I am! :^D
What are the essential changes required to httpd.conf? There are about a half-dozen virtual domains at the moment.
Thanks again! You guys are awesome. M
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Looks good. I'd make one change. In my setups, I'm adamant that Zope is not accessed, except by via apache. I edit my zope setup to listen only on localhost (127.0.0.1) and change my Apache RewriteRules to use that instead of the server ip (111.111.111.111.) I also like my managing to be done via https so passwords are not passed cleartext. For that to work, I have an additional domain (or sub-domain.) Zope looks like this: Zope root (zope.domain.com) + buystuff (buystuff.com) + mycause (mycause.com) Apache listens on 443 and 80, then I use the following rewrite rules buystuff.com: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/buystuff$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.buystuff.com:80/buystuff/Virt... [L,P] mycause.org: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/mycause$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.mycause.org:80/mycause/Virtua... [L,P] This way, you only have one IP and one SSL cert - saves money. BTW, 'buystuff$1' is not a typo. It's needed because the pattern match includes the forward-slash. Troy Patrick Kirk wrote:
OK. I'd be grateful if others on the list would read this as well to provide a sanity check.
Step 1: Put a Virtual Host Monster in your Zope root folder. Give it a unique id but it really doesn't matter what you call it.
Step 2: Let us assume you have a site called http://www.buystuff.com served from a folder called "buystuff" in your root directory and a site called http://www.mycause.org is served from "mycause" folder. Lets also assume your IP is 111.111.111.111 and Zope is on port 8081 with Apache on port 80.
Step 3: The virtual hosts section for www.buystuff.com will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.buystuff.com ErrorLog logs/www.buystuff.com-error_log CustomLog logs/www.buystuff.com-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.buystuff.com:80/buystuf... [NC,L,P]
</VirtualHost>
Step 4: The virtual hosts section for www.mycause.org will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.mycause.org ErrorLog logs/www.mycause.org-error_log CustomLog logs/www.mycause.org-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.mycause.org:80/mycause/... [NC,L,P]
</VirtualHost>
Apart from the [NC,L,P] this is from the virtual host monster documentation. And others on this list gave me them!
Step 5: Run the command "apachectl configtest" and it will tell you if there are any syntax errors without requiring you to restart apache and find out the hard way you've put a comma in the wrong place.
Step 6: Run "apachectl restart" and your sites should now be served from Zope through Apache. And the beauty of it is that it just works.
If you have any problems, let us know.
Best regards,
Patrick Kirk
I like the way you shield zope behind apache for all purposes but I don't understand the sections that say Zope management rule. Why do you use http://zope.domain.com/buystuff/manage instead of www.buystuff.com/manage? Best regards, Patrick Kirk Mobile: 07876 560 646 Troy Farrell wrote:
Looks good. I'd make one change. In my setups, I'm adamant that Zope is not accessed, except by via apache. I edit my zope setup to listen only on localhost (127.0.0.1) and change my Apache RewriteRules to use that instead of the server ip (111.111.111.111.) I also like my managing to be done via https so passwords are not passed cleartext. For that to work, I have an additional domain (or sub-domain.)
Zope looks like this:
Zope root (zope.domain.com) + buystuff (buystuff.com) + mycause (mycause.com)
Apache listens on 443 and 80, then I use the following rewrite rules
buystuff.com: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/buystuff$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.buystuff.com:80/buystuff/Virt... [L,P]
mycause.org: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/mycause$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.mycause.org:80/mycause/Virtua... [L,P]
This way, you only have one IP and one SSL cert - saves money. BTW, 'buystuff$1' is not a typo. It's needed because the pattern match includes the forward-slash.
Troy
Patrick Kirk wrote:
OK. I'd be grateful if others on the list would read this as well to provide a sanity check.
Step 1: Put a Virtual Host Monster in your Zope root folder. Give it a unique id but it really doesn't matter what you call it.
Step 2: Let us assume you have a site called http://www.buystuff.com served from a folder called "buystuff" in your root directory and a site called http://www.mycause.org is served from "mycause" folder. Lets also assume your IP is 111.111.111.111 and Zope is on port 8081 with Apache on port 80.
Step 3: The virtual hosts section for www.buystuff.com will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.buystuff.com ErrorLog logs/www.buystuff.com-error_log CustomLog logs/www.buystuff.com-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.buystuff.com:80/buystuf... [NC,L,P]
</VirtualHost>
Step 4: The virtual hosts section for www.mycause.org will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.mycause.org ErrorLog logs/www.mycause.org-error_log CustomLog logs/www.mycause.org-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.mycause.org:80/mycause/... [NC,L,P]
</VirtualHost>
Apart from the [NC,L,P] this is from the virtual host monster documentation. And others on this list gave me them!
Step 5: Run the command "apachectl configtest" and it will tell you if there are any syntax errors without requiring you to restart apache and find out the hard way you've put a comma in the wrong place.
Step 6: Run "apachectl restart" and your sites should now be served from Zope through Apache. And the beauty of it is that it just works.
If you have any problems, let us know.
Best regards,
Patrick Kirk
Please ignore that last email - I missed the https :-( Patrick Kirk wrote:
I like the way you shield zope behind apache for all purposes but I don't understand the sections that say Zope management rule.
Why do you use http://zope.domain.com/buystuff/manage instead of www.buystuff.com/manage?
Best regards,
Patrick Kirk Mobile: 07876 560 646
Troy Farrell wrote:
Looks good. I'd make one change. In my setups, I'm adamant that Zope is not accessed, except by via apache. I edit my zope setup to listen only on localhost (127.0.0.1) and change my Apache RewriteRules to use that instead of the server ip (111.111.111.111.) I also like my managing to be done via https so passwords are not passed cleartext. For that to work, I have an additional domain (or sub-domain.)
Zope looks like this:
Zope root (zope.domain.com) + buystuff (buystuff.com) + mycause (mycause.com)
Apache listens on 443 and 80, then I use the following rewrite rules
buystuff.com: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/buystuff$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.buystuff.com:80/buystuff/Virt... [L,P]
mycause.org: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/mycause$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.mycause.org:80/mycause/Virtua... [L,P]
This way, you only have one IP and one SSL cert - saves money. BTW, 'buystuff$1' is not a typo. It's needed because the pattern match includes the forward-slash.
Troy
Patrick Kirk wrote:
OK. I'd be grateful if others on the list would read this as well to provide a sanity check.
Step 1: Put a Virtual Host Monster in your Zope root folder. Give it a unique id but it really doesn't matter what you call it.
Step 2: Let us assume you have a site called http://www.buystuff.com served from a folder called "buystuff" in your root directory and a site called http://www.mycause.org is served from "mycause" folder. Lets also assume your IP is 111.111.111.111 and Zope is on port 8081 with Apache on port 80.
Step 3: The virtual hosts section for www.buystuff.com will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.buystuff.com ErrorLog logs/www.buystuff.com-error_log CustomLog logs/www.buystuff.com-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.buystuff.com:80/buystuf... [NC,L,P]
</VirtualHost>
Step 4: The virtual hosts section for www.mycause.org will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.mycause.org ErrorLog logs/www.mycause.org-error_log CustomLog logs/www.mycause.org-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.mycause.org:80/mycause/... [NC,L,P]
</VirtualHost>
Apart from the [NC,L,P] this is from the virtual host monster documentation. And others on this list gave me them!
Step 5: Run the command "apachectl configtest" and it will tell you if there are any syntax errors without requiring you to restart apache and find out the hard way you've put a comma in the wrong place.
Step 6: Run "apachectl restart" and your sites should now be served from Zope through Apache. And the beauty of it is that it just works.
If you have any problems, let us know.
Best regards,
Patrick Kirk
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Ah. Look closely. I'm redirecting http://buystuff.com/manage to HTTPS://zope.domain.com/buystuff/manage Patrick Kirk wrote:
I like the way you shield zope behind apache for all purposes but I don't understand the sections that say Zope management rule.
Why do you use http://zope.domain.com/buystuff/manage instead of www.buystuff.com/manage?
Best regards,
Patrick Kirk Mobile: 07876 560 646
Troy Farrell wrote:
Looks good. I'd make one change. In my setups, I'm adamant that Zope is not accessed, except by via apache. I edit my zope setup to listen only on localhost (127.0.0.1) and change my Apache RewriteRules to use that instead of the server ip (111.111.111.111.) I also like my managing to be done via https so passwords are not passed cleartext. For that to work, I have an additional domain (or sub-domain.)
Zope looks like this:
Zope root (zope.domain.com) + buystuff (buystuff.com) + mycause (mycause.com)
Apache listens on 443 and 80, then I use the following rewrite rules
buystuff.com: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/buystuff$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.buystuff.com:80/buystuff/Virt... [L,P]
mycause.org: # Zope management rule RewriteRule ^(.*)/manage(.*) https://zope.domain.com/mycause$1/manage$2 [R] # Zope VHM rule RewriteRule ^/(.*) http://127.0.0.1:8081/VirtualHostBase/http/www.mycause.org:80/mycause/Virtua... [L,P]
This way, you only have one IP and one SSL cert - saves money. BTW, 'buystuff$1' is not a typo. It's needed because the pattern match includes the forward-slash.
Troy
Patrick Kirk wrote:
OK. I'd be grateful if others on the list would read this as well to provide a sanity check.
Step 1: Put a Virtual Host Monster in your Zope root folder. Give it a unique id but it really doesn't matter what you call it.
Step 2: Let us assume you have a site called http://www.buystuff.com served from a folder called "buystuff" in your root directory and a site called http://www.mycause.org is served from "mycause" folder. Lets also assume your IP is 111.111.111.111 and Zope is on port 8081 with Apache on port 80.
Step 3: The virtual hosts section for www.buystuff.com will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.buystuff.com ErrorLog logs/www.buystuff.com-error_log CustomLog logs/www.buystuff.com-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.buystuff.com:80/buystuf... [NC,L,P]
</VirtualHost>
Step 4: The virtual hosts section for www.mycause.org will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.mycause.org ErrorLog logs/www.mycause.org-error_log CustomLog logs/www.mycause.org-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.mycause.org:80/mycause/... [NC,L,P]
</VirtualHost>
Apart from the [NC,L,P] this is from the virtual host monster documentation. And others on this list gave me them!
Step 5: Run the command "apachectl configtest" and it will tell you if there are any syntax errors without requiring you to restart apache and find out the hard way you've put a comma in the wrong place.
Step 6: Run "apachectl restart" and your sites should now be served from Zope through Apache. And the beauty of it is that it just works.
If you have any problems, let us know.
Best regards,
Patrick Kirk
Hi guys, I just got around to testing it and it does not quite work: Bad Gateway The proxy server received an invalid response from an upstream server. Additionally, a 502 Bad Gateway error was encountered while trying to use an ErrorDocument to handle the request. ------------------------------------------------------------------------ Apache/2.0.48 (Unix) Server at blackmarketing.ca Port 80 Here is a sample VirtualHost directive from httpd.conf: <VirtualHost *:80> ServerAdmin webmaster@9303.com DocumentRoot users/9303 ServerName sam.9303.com ServerAlias *.sam.9303.com ErrorLog logs/9303_error_log CustomLog logs/9303_access_log combined RewriteEngine on RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/www.sam.9303.com:80/sam/ VirtualHostRoot/$1 [NC,L,P] </VirtualHost> Any suggestions? Thanks! Murray On 29-Feb-04, at 3:46 PM, Patrick Kirk wrote:
OK. I'd be grateful if others on the list would read this as well to provide a sanity check.
Step 1: Put a Virtual Host Monster in your Zope root folder. Give it a unique id but it really doesn't matter what you call it.
Step 2: Let us assume you have a site called http://www.buystuff.com served from a folder called "buystuff" in your root directory and a site called http://www.mycause.org is served from "mycause" folder. Lets also assume your IP is 111.111.111.111 and Zope is on port 8081 with Apache on port 80.
Step 3: The virtual hosts section for www.buystuff.com will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.buystuff.com ErrorLog logs/www.buystuff.com-error_log CustomLog logs/www.buystuff.com-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.buystuff.com:80/ buystuff/VirtualHostRoot/$1 [NC,L,P]
</VirtualHost>
Step 4: The virtual hosts section for www.mycause.org will read: <VirtualHost *:80> ServerAdmin you@you.com DocumentRoot /this/does/not/matter ServerName www.mycause.org ErrorLog logs/www.mycause.org-error_log CustomLog logs/www.mycause.org-access_log common RewriteEngine on RewriteRule ^/(.*) http://111.111.111.111:8081/VirtualHostBase/http/www.mycause.org:80/ mycause/VirtualHostRoot/$1 [NC,L,P]
</VirtualHost>
Apart from the [NC,L,P] this is from the virtual host monster documentation. And others on this list gave me them!
Step 5: Run the command "apachectl configtest" and it will tell you if there are any syntax errors without requiring you to restart apache and find out the hard way you've put a comma in the wrong place.
Step 6: Run "apachectl restart" and your sites should now be served from Zope through Apache. And the beauty of it is that it just works.
If you have any problems, let us know.
Best regards,
Patrick Kirk Mobile: 07876 560 646
Murray Pearson wrote:
On 29-Feb-04, at 11:52 AM, Patrick Kirk wrote:
Hi Murray,
I've never used OpenBSD but when installing from Ports can you specify that Apache be compiled with mod_proxy and mod_rewrite support? That's the first essential. Not sure... but I'll just install the latest (2.0.48) from source anyway. Actually, it just finished the "make install" step a few seconds ago! :^) I decided to statically include mod_proxy and mod_rewrite, as they will be used in every 'real' request anyhow. If you like to compile from source, I've a Configuration.tmpl that has the essential edits done attached but obviously it makes more sense to edit your own copy to your own satisfaction. Here's what I used: -bash-2.05b$ sudo ./configure --prefix=/var/www --enable-rewrite --enable-proxy To see if Apache's already got that support simply enter the command 'httpd -l' at the command line. Bingo! -bash-2.05b$ /var/www/bin/httpd -l Compiled in modules: core.c mod_access.c mod_auth.c mod_include.c mod_log_config.c mod_env.c mod_setenvif.c mod_proxy.c proxy_connect.c proxy_ftp.c proxy_http.c prefork.c http_core.c mod_mime.c mod_status.c mod_autoindex.c mod_asis.c mod_cgi.c mod_negotiation.c mod_dir.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_rewrite.c mod_so.c Once you are sure that both mod_rewrite and mod_proxy support are present, its really very easy to configure httpd.conf and Zope but let us know when you've verified getting to that stage. Here I am! :^D What are the essential changes required to httpd.conf? There are about a half-dozen virtual domains at the moment. Thanks again! You guys are awesome. M
Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Murray Pearson -
Patrick Kirk -
Troy Farrell