[peruser] NameVirtualHost support on ssl enabled ports Lazy

Stefan Klingner stefan.klingner at mephisto23.com
Sat Aug 15 15:28:13 MDT 2009


contact them. i hope you will have luck! i would also give an repository 
for packages and enough place for free to a community around a fork if 
one ore more of the developers are interested in that. i think peruser 
is currently the best solution for shared hosting and releases including 
all these cool patches should be there.

regards,

stefan

cal at foxwhisper.co.uk schrieb:
> Hey Guys,
>
> Lots of thanks to the anonymous person who submitted the patch for Multiple
> VirtualHost SSLs via mpm-peruser, it's worked a treat! However - the patch
> he submitted didn't work with dc3 by default, so here is a new one! 
>
> I'm thinking of perhaps submitting a request to the debian package
> maintenance team, and asking if we can submit mpm-peruser to the repos, I
> would quite happily maintain the deb packages (I've already built a deb
> package for 64bit and 32bit which works very nicely)
>
> --- apache2/server/mpm/experimental/peruser/peruser.c   2009-08-15
> 19:58:17.322137212 +0100
> +++ /tmp/peruser.c  2009-08-15 19:53:18.409636770 +0100
> @@ -131,6 +131,35 @@
>  #include <signal.h>
>  #include <sys/times.h>
>
> +//enable my dirty ssl vhost hack Michal Grzedzicki <[EMAIL PROTECTED]>
> +#define SSL_VIRTUALHOST_HACK
> +
> +#ifdef SSL_VIRTUALHOST_HACK
> +
> +//taken form mod_ssl.h
> +//we only use enabled so other pointers are casted to void
> +typedef struct {
> +  void            *mc;
> +  unsigned int     enabled;
> +  unsigned int     proxy_enabled;
> +  const char      *vhost_id;
> +  int              vhost_id_len;
> +  int              session_cache_timeout;
> +  void            *server;
> +  void            *proxy;
> +} SSLSrvConfigRec;
> +
> +
> +//not not sure if this is the right way to do it
> +//without ssl it will not work
> +
> +extern module AP_MODULE_DECLARE_DATA ssl_module;
> +
> +static SSLSrvConfigRec *ssl_config;
> +
> +#endif
> +
> +
>
>  #ifdef MPM_PERUSER_DEBUG
>  # define _DBG(text,par...) \
> @@ -996,7 +1025,21 @@
>             current_conn->vhost_lookup_data ? "on" : "off");
>      }
>
> -    if (current_conn && !current_conn->vhost_lookup_data &&
> CHILD_INFO_TABLE[my_child_num].type == CHILD_TYPE_MULTIPLEXER) {
> +#ifdef SSL_VIRTUALHOST_HACK
> +
> +    //check for ssl configuration for this server
> +    ssl_config = (SSLSrvConfigRec
> *)ap_get_module_config(current_conn->base_server->module_config,
> &ssl_module);
> +
> +    //pass socket if there is no NameVirtualhost or ssl is enabled on this
> server
> +    if (current_conn && (!current_conn->vhost_lookup_data ||
> ssl_config?ssl_config->enabled:0 ) && \
> +   CHILD_INFO_TABLE[my_child_num].type == CHILD_TYPE_MULTIPLEXER) {
> +
> +#else SSL_VIRTUALHOST_HACK
> +
> +    if (current_conn && !current_conn->vhost_lookup_data &&
> CHILD_INFO_TABLE[my_child_num].type == \
> +   CHILD_TYPE_MULTIPLEXER) {
> +
> +#endif
>         _DBG("We are not using name based vhosts, we'll directly pass the
> socket.");
>
>     sconf = PERUSER_SERVER_CONF(current_conn->base_server->module_config);
>
>
>
>
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://link.mail2web.com/mail2web
>
>
> _______________________________________________
> Peruser mailing list
> Peruser at telana.com
> http://www.telana.com/mailman/listinfo/peruser
>   


More information about the Peruser mailing list