Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

so I broke my business' website, doing a stupid sanity check command that failed. We can discuss why I chose to sanity check apache like this.

How would I go about debugging this problem? Here are my observations on the situation:

  • httpd -k restart works
  • the vps*.host.com still resolves
  • the website won't resolve
  • ping www.WEBSITE.com still works

whm-server-status

Apache Status

Apache Server Status for 127.0.0.1

Server Version: Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 SVN/1.6.2
Server Built: Mar 29 2010 12:52:34

Current Time: Monday, 05-Jul-2010 15:46:47 PDT
Restart Time: Monday, 05-Jul-2010 15:42:33 PDT
Parent Server Generation: 0
Server uptime: 4 minutes 13 seconds
Total accesses: 2 - Total Traffic: 0 kB
CPU Usage: u0 s0 cu0 cs0
.00791 requests/sec - 0 B/second - 0 B/request
1 requests currently being processed, 5 idle workers
W_..........................................................
................................................................
................................................................
................................................................

Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process

SrvPIDAccMCPU SSReqConnChildSlotClientVHostRequest

0-030980/1/1_ 0.009400.00.000.00 127.0.0.1vps1.host.comGET / HTTP/1.0

1-030990/1/1_ 0.0054530.00.000.00 99.107.235.0vps1.host.comGET /whm-server-status HTTP/1.1

2-031010/0/0W 0.00000.00.000.00 127.0.0.1vps1.host.comGET /whm-server-status HTTP/1.0


SrvChild Server number - generation PIDOS process ID AccNumber of accesses this connection / this child / this slot MMode of operation CPUCPU usage, number of seconds SSSeconds since beginning of most recent request ReqMilliseconds required to process most recent request ConnKilobytes transferred this connection ChildMegabytes transferred this child SlotTotal megabytes transferred this slot
SSL/TLS Session Cache Status: cache type: DBM, maximum size: unlimited
current sessions: 0, current size: 0 bytes
average session size: 0 bytes

share|improve this question
    
Please don't "mark" your question as fixed in the title - Accepting an answer automatically marks the question answered. (Similarly putting "Emergency" in your title doesn't buy you anything - Every problem is an "emergency" to the person its happening to :-) –  voretaq7 Mar 27 '12 at 18:41
    
fair enough - thanks. –  montooner Mar 30 '12 at 2:12
add comment

2 Answers

up vote 3 down vote accepted

I tried accessing your site and all non-HTTPS requests to www.website.com are being redirected to the same URL but with an https scheme, e.g.

http://www.website.com/ -> https://www.website.com

But the HTTPS port on your server (port 443) is closed, which means there's no server listening on it (which is what you'd need to be handling HTTPS requests).

I'm guessing that the server should not be redirecting regular HTTP requests to HTTPS. You should try to figure out why it's doing that and fix it. Usually this sort of thing is done with a directive like

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.website.com\1

somewhere in the Apache configuration.

If you really do mean to serve your entire site over HTTPS, you will need to add

Listen 443

in the configuration file.

share|improve this answer
    
Fixed it per your instruction. What's weird is that I already have a block of code that seems to do just that. {<IfDefine SSL> Listen 0.0.0.0:443; AddType application/x-x509-ca-cert .crt; AddType application/x-pkcs7-crl .crl; </IfDefine>} –  montooner Jul 5 '10 at 23:10
    
Yep, that block of code you quoted will get Apache to listen on port 443, but only if the SSL Apache environment variable is defined. You could define it by passing the -DSSL option to Apache when you start it up (if you wanted to have an HTTPS site). This is an easy way to conditionally enable or disable all the different parts of the configuration that relate to HTTPS. –  David Z Jul 6 '10 at 0:42
    
Anyway, I'm glad you got it working again :-) –  David Z Jul 6 '10 at 0:43
add comment

First: Check the error logs - maybe at /var/log/apache/error_log (or /etc/httpd/logs/error_log)

share|improve this answer
    
+1 always a good idea –  David Z Jul 5 '10 at 22:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.