0

I'm trying to do a reaspberry pi project that involves using web2py to create a web interface for the gpio pins, this is the project.

Basically i've got to the point where i try to go to the admin page of web2py, and this should be achieved by accessing the pi's through an ssl connection (through https://pi_address), but when i try to do this, all i get is an error in google chrome: Error code: ERR_SSL_PROTOCOL_ERROR

It must have something to do with the SSL key that for some reason i'm not getting... i have configured a key using openssl req -new -key ca.key -out ca.csr and the files have been generated on the server side (raspberry), but i dont know what to do with them...

I'm pretty sure you need extra info to help me out with this one, but i don't know what else to provide and how to get that info, so if you could please ask for any extra info, i'll be checking this post for the next hours

EDIT:

As asked in an answer, the content of my apache default.conf file:

WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1

<VirtualHost *:80>

  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

  CustomLog /var/log/apache2/access.log common
  ErrorLog /var/log/apache2/error.log
</VirtualHost>

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/self_signed.cert
  SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key

  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
  WSGIPassAuthorization On

  <Directory /home/www-data/web2py>
    AllowOverride None
    Require all denied
    <Files wsgihandler.py>
      Require all granted
    </Files>
  </Directory>

  AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
        /home/www-data/web2py/applications/$1/static/$2

  <Directory /home/www-data/web2py/applications/*/static/>
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Require all granted
  </Directory>

  CustomLog /var/log/apache2/ssl-access.log common
  ErrorLog /var/log/apache2/error.log
</VirtualHost>

1 Answer 1

1

Based on the link you provided I'm assuming these two lines are in your apache config:

SSLCertificateFile /etc/apache2/ssl/self_signed.cert
SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key

so those are the locations where your generated key files should go. If these lines aren't in your apache config (which should be in /etc/apache2/sites-available/default.conf ) post the contents of that file for further help.

Sign up to request clarification or add additional context in comments.

4 Comments

i forgot the pi at work, i am almost sure they are there, but i will check tomorrow first thing in the morning, thanks :)
just checked, those lines are there... I just edited the question with the content of my default.conf
And the .key and .cert files are in those two locations? If so I'm at a loss...is there perhaps a firewall blocking port 443 on the raspberry pi? Other than that best advice I can give is check the Apache error log to see if you can gather anything from there.
both files are there, I will check for firewalls now

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.