You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Taylor Dondich <td...@majiknetworks.com> on 2003/12/20 01:31:05 UTC

[users@httpd] Apache2 w/ SSL and mod_vhost_alias, can this be done?

I'm using Apache2 with it's SSL usage.  I am using mod_vhost_alias for 
dynamic virtual hosts.  However, I need to setup virtual hosts with SSL 
setup.

So I have a virtualhost entry for secure.mydomain.com, yet, when I pull 
it up, I get this error msg:

: Invalid method in request g

What does this mean?  And am I doing this right?

I have copies of my httpd.conf and ssl.conf if anyone needs.

Taylor



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 w/ SSL and mod_vhost_alias, can this be done?

Posted by Joe Apache <ap...@productivitymedia.com>.
>>
>> I'm using Apache2 with it's SSL usage.  I am using mod_vhost_alias for
>> dynamic virtual hosts.  However, I need to setup virtual hosts with 
>> SSL
>> setup.
>
> Name-based virtual hosts and SSL don't mix.  It's a fundamental
> limitation.  Each SSL vhost must be on a unique ip:port combination.
>

Correct.... use port based vhosts ... example

<192.168.1.1:446>
<192.168.1.1:447>

Don't forget to pass the ports in your firewall... assuming you using 
one... and provide a:

Listen 446
Listen 447

in your conf files.

Also, check out the Apache documentation and do a google.  All the info 
you will ever need is easily found.  Lastly, include 'sample' 
configuration vhost files.... We can spot and problems that way also.

J 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] UPDATE: Re: [users@httpd] Apache2 w/ SSL and mod_vhost_alias, can this be done?

Posted by Taylor Dondich <td...@majiknetworks.com>.
Well, I've further looked into the problem, and here's what I can tell.

When I have only 1 ip address on my server, and apache2 running on it, 
with Listen 80 in httpd.conf with mod_vhost_alias running, and then 
Listen 443 in ssl.conf with a virtualhost definition like this:

<VirtualHost 64.89.232.200:443>
                                                                                                                                            

#  General setup for the virtual host
DocumentRoot "/virtuals/netnevada.net/secure/public_html"
ServerName secure.netnevada.net:443
ServerAdmin admin@datacomhotel.net
ErrorLog /var/log/httpd-error_log
TransferLog /var/log/httpd-access_log
SSLEngine on
SSLCipherSuite 
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
                                                                                                                                            

SSLCertificateFile /usr/local/etc/apache2/ssl.crt/secure.netnevada.net.crt
SSLCertificateKeyFile 
/usr/local/etc/apache2/ssl.key/secure.netnevada.net.key
                                                                                                                                            

<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
                                                                                                                                            

SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
                                                                                                                                            

</VirtualHost>


Everything works.  But as soon as I put another ip address on the same 
network card (same subnet), then change the VirtualHost entry to have 
that ip address, I get Invalid Request error when trying to pull up the 
ssl site.

Any ideas?

Taylor

Brian Dessent wrote:

>Taylor Dondich wrote:
>  
>
>>I'm using Apache2 with it's SSL usage.  I am using mod_vhost_alias for
>>dynamic virtual hosts.  However, I need to setup virtual hosts with SSL
>>setup.
>>    
>>
>
>Name-based virtual hosts and SSL don't mix.  It's a fundamental
>limitation.  Each SSL vhost must be on a unique ip:port combination.
>
>(I can't tell if that's your problem or not, but when you mention
>virtual hosts and SSL the issue comes to mind.)
>
>Brian
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 w/ SSL and mod_vhost_alias, can this be done?

Posted by Brian Dessent <br...@dessent.net>.
Taylor Dondich wrote:
> 
> I'm using Apache2 with it's SSL usage.  I am using mod_vhost_alias for
> dynamic virtual hosts.  However, I need to setup virtual hosts with SSL
> setup.

Name-based virtual hosts and SSL don't mix.  It's a fundamental
limitation.  Each SSL vhost must be on a unique ip:port combination.

(I can't tell if that's your problem or not, but when you mention
virtual hosts and SSL the issue comes to mind.)

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Remote reboot?

Posted by Jason <ha...@comcast.net>.
Thanks for the assistance.....actually figured it out before I checked
back here...just use WinXP remote config/connection which I had
forgotten about...makes it easier....note I said WINDOWS
XP....hhhmmmmmmm

jason

-----Original Message-----
From: Don [mailto:dnrlinux@san.rr.com] 
Sent: Friday, December 19, 2003 10:14 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Remote reboot?


On Fri, 2003-12-19 at 19:58, Brian Dessent wrote:
> Don wrote:
> 
> > Holy Moly! You don't need to reboot the entire machine just to 
> > restart the Apache server..... just restart the Apache server by 
> > itself.... service httpd restart
> 
> The first line of his question was, "Is there a way to remote reboot 
> an apache server?"  Keyword: reboot.  :-)

See? We interpreted the original question differently... to you the
keyword was "reboot", to me the keyword was "server"... ;-)

Now we're into semantics.... what is "the apache server"? If the goal is
to restart "The apache server" that question has to be answered first...
Apparenntly, to you, the Apache server is the hardware, to me it is the
httpd application software.

Personally I'd NEVER reboot the hardware just to restart one application
unless it was required for some reason.... 

The other way/command to restart Apache is (as root)...
    apachectl restart

Don :-)



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Remote reboot?

Posted by Don <dn...@san.rr.com>.
On Fri, 2003-12-19 at 19:58, Brian Dessent wrote:
> Don wrote:
> 
> > Holy Moly! You don't need to reboot the entire machine just to restart
> > the Apache server..... just restart the Apache server by itself....
> > service httpd restart
> 
> The first line of his question was, "Is there a way to remote reboot an
> apache server?"  Keyword: reboot.  :-)

See? We interpreted the original question differently... to you the
keyword was "reboot", to me the keyword was "server"... ;-)

Now we're into semantics.... what is "the apache server"? If the goal is
to restart "The apache server" that question has to be answered first...
Apparenntly, to you, the Apache server is the hardware, to me it is the
httpd application software.

Personally I'd NEVER reboot the hardware just to restart one application
unless it was required for some reason.... 

The other way/command to restart Apache is (as root)...
    apachectl restart

Don :-)



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Remote reboot?

Posted by Brian Dessent <br...@dessent.net>.
Don wrote:

> Holy Moly! You don't need to reboot the entire machine just to restart
> the Apache server..... just restart the Apache server by itself....
> service httpd restart

The first line of his question was, "Is there a way to remote reboot an
apache server?"  Keyword: reboot.  :-)

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Remote reboot?

Posted by Don <dn...@san.rr.com>.
On Fri, 2003-12-19 at 19:18, Brian Dessent wrote:
> Jason wrote:
> 
> > Is there a way to remote reboot an apache server?  I'm using Apache 2.x
> > on winxp which shouldn't make any difference.  I use my server on a
> > non-monitor box (access everything over the network/intranet) and would
> > like to be able to remotely reboot/restart apache without having to
> > physically be at the apache box.
> 
> You could install sshd and then ssh into the box remotely and issue the
> 'shutdown -r now' command, just as with unix.  Cygwin is one (free) way
> to accomplish this, I'm sure there are others.  I'm pretty sure MS's
> terminal services provides something similar, but I think MS only
> includes it with the server versions of its OSs.

Holy Moly! You don't need to reboot the entire machine just to restart
the Apache server..... just restart the Apache server by itself....
service httpd restart

:-)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Remote reboot?

Posted by Brian Dessent <br...@dessent.net>.
Jason wrote:

> Is there a way to remote reboot an apache server?  I'm using Apache 2.x
> on winxp which shouldn't make any difference.  I use my server on a
> non-monitor box (access everything over the network/intranet) and would
> like to be able to remotely reboot/restart apache without having to
> physically be at the apache box.

You could install sshd and then ssh into the box remotely and issue the
'shutdown -r now' command, just as with unix.  Cygwin is one (free) way
to accomplish this, I'm sure there are others.  I'm pretty sure MS's
terminal services provides something similar, but I think MS only
includes it with the server versions of its OSs.

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Remote reboot?

Posted by Don <dn...@san.rr.com>.
On Fri, 2003-12-19 at 19:22, Don wrote:
> On Fri, 2003-12-19 at 18:59, Jason wrote:
> > Greetings,
> > 
> > Is there a way to remote reboot an apache server?  I'm using Apache 2.x
> > on winxp which shouldn't make any difference.  I use my server on a
> > non-monitor box (access everything over the network/intranet) and would
> > like to be able to remotely reboot/restart apache without having to
> > physically be at the apache box.  
> 
> I do that sort of thing all the time...
> from my remote machine.... ssh root@host
> then once I'm logged in.... service httpd restart
> logout
> 
> Done. :-)

Sorry... I corrected a typo above...  should be 
     service httpd restart

Don

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Remote reboot?

Posted by Don <dn...@san.rr.com>.
On Fri, 2003-12-19 at 18:59, Jason wrote:
> Greetings,
> 
> Is there a way to remote reboot an apache server?  I'm using Apache 2.x
> on winxp which shouldn't make any difference.  I use my server on a
> non-monitor box (access everything over the network/intranet) and would
> like to be able to remotely reboot/restart apache without having to
> physically be at the apache box.  

I do that sort of thing all the time...
from my remote machine.... ssh root@host
then once I'm logged in.... service nttpd restart
logout

Done. :-)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Remote reboot?

Posted by Jason <ha...@comcast.net>.
Greetings,

Is there a way to remote reboot an apache server?  I'm using Apache 2.x
on winxp which shouldn't make any difference.  I use my server on a
non-monitor box (access everything over the network/intranet) and would
like to be able to remotely reboot/restart apache without having to
physically be at the apache box.  


Thanks


Jason 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org