Pagina 1 di 1

[Server] Apache + SSL = errore 503

Inviato: mercoledì 27 maggio 2009, 19:05
da vecchia
Salve a tutti,
ho configurato il mio ubuntu 9.04 con il certificato ssl che viene tranquillamente letto dal browser e quindi funge perfettamente, riesco ad aprire normalmente il sito e a utilizzarlo, ma se tento questo:

Codice: Seleziona tutto

http://www.miosito.ltd:443
o

Codice: Seleziona tutto

https://www.miosito.ltd
non si apre. Nel primo caso ricevo questo errore:

Codice: Seleziona tutto

Bad Request

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
nel secondo caso ottengo questo errore:

Codice: Seleziona tutto

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
premetto che sto usando ruby on rails sul server  :'(

Re: [Server] Apache + SSL = errore 503

Inviato: mercoledì 27 maggio 2009, 19:51
da il_muflone
nel primo caso e` assolutamente normale, non puoi usare http sulla porta ssl
nel secondo caso, hai configurato il vhost su quella porta?
apache e` in ascolto sulla 443?

ciao

Re: [Server] Apache + SSL = errore 503

Inviato: mercoledì 27 maggio 2009, 19:56
da vecchia
si, apache è in ascolto sulla porta 443 correttamente e infatti io ci accedo al virtual host ssl, solo che qualcosa non funziona... presumo che sia il proxy_balancer... l'ho configurato come segue:

Codice: Seleziona tutto

<Proxy balancer://mongrel_cluster>
  BalancerMember http://localhost:3000
  BalancerMember http://localhost:3001
  BalancerMember http://localhost:3002
  BalancerMember http://localhost:3003
  BalancerMember http://localhost:3004
</Proxy>

<VirtualHost *:443>
...
<Directory /opt/ror/public/>
    Options -ExecCGI FollowSymLinks -Indexes
    AllowOverride None
    Order allow,deny
    allow from any
  </Directory>

  RewriteEngine on

  RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /maintenance.html [L]

  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
  RewriteRule (.*) $1 [L]

  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]

  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE application/xml
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</VirtualHost>

Re: [Server] Apache + SSL = errore 503

Inviato: mercoledì 27 maggio 2009, 20:23
da vecchia
nei log di apache ecco quello che appare quando tento di connettermi al sito con ssl:

Codice: Seleziona tutto

[Wed May 27 19:46:21 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed May 27 19:46:24 2009] [error] (111)Connection refused: proxy: HTTPS: attempt to connect to 82.88.117.70:443 (*) failed
[Wed May 27 19:46:24 2009] [error] (111)Connection refused: proxy: HTTPS: attempt to connect to 82.88.117.70:443 (*) failed