[SOLVED] 'invalid method in request' - Apache & SSL on Centos
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
'invalid method in request' - Apache & SSL on Centos
Hi everyone,
Ever since I have changed my Centos 5 server to work with HTTPS, I've not been able to view my locally stored webpages. Apache starts fine, but any attempts to access my webserver results in a "ssl_error_rx_record"too_long_" error in my browser, and in the Apache error log I get the error:
"[error] [client 192.168.1.100' invalid method in request \x16\x03\x01".
I know my SSL certificate is fine, because It's a signed one from GoDaddy and it works fine with other services (eg. 'telnet localhost smtp' works fine for my postfix configuration).
I read somewhere that if i type the following:
Code:
# telnet 192.168.0.1 443
GET /
and a bunch of HTML code is presented, then my mod_ssl module isn't loading. Indeed, this 'HTML dump' is what is happening to me. Further, I've also read some things about running an "a2ensite" command, but this appears only to be a debian thing???
Below are the important lines of my ssl.conf and httpd.conf. I've been stumped on this for a while, so any help would be wonderful!
Somehow you're talking plain http to the ssl server. Why don't you load the mod_ssl module? And you have an error in ServerName (no need for :443 at the end)
Anyway, use the following and see if it works
Sorry I forgot to mention that I was loading mod_ssl.so from httpd.conf. For completeness sake, I have included the whole httpd.conf file below.
Anyway, Good news! (well sort of). Removing the <ifDefine> tags has gotten rid of the invalid method request error. I'm still unable to view my SquirrelMail login page whenever i attempt to access https://my.mailserverlogin.com (or https://my.mailserverlogin.com:443 , for that matter). Instead of the "rx_record_too_long_" I am now getting a different error:
The connection was interrupted. The connection to my.mailserverlogin.com was interrupted while the page was loading.
and this is what happens when I do an openssl s_client -connect:192.168.0.1:443 :
interestingly, my SquirrelMail login page is loading (without SSL) if I visit http://www.my.mailserverlogin.com:443 . At least httpd is now restarting without errors...
interestingly, my SquirrelMail login page is loading (without SSL) if I visit http://www.my.mailserverlogin.com:443 . At least httpd is now restarting without errors...
As I've told you, you're talking http instead of https in the secure port.
I noticed that you miss the following in ssl.conf:
Code:
SSLEngine on
Add it inside the VirtualHost stanza and see if it works
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.