Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 apt-get install openssl ssl-cert
- 2 mkdir /etc/apache2/ssl
- 3 make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
- 4 cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
- this is /etc/apache2/sites-available/ssl
- -----------------------------------------------
- <VirtualHost *:443>
- ServerAdmin webmaster@localhost
- DocumentRoot /var/www
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- </Directory>
- <Directory /var/www/>
- Options Indexes FollowSymLinks MultiViews
- AllowOverride None
- Order allow,deny
- allow from all
- </Directory>
- ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
- <Directory "/usr/lib/cgi-bin">
- AllowOverride None
- Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
- Order allow,deny
- Allow from all
- </Directory>
- ErrorLog ${APACHE_LOG_DIR}/error.log
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- LogLevel warn
- CustomLog ${APACHE_LOG_DIR}/access.log combined
- Alias /doc/ "/usr/share/doc/"
- <Directory "/usr/share/doc/">
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- Allow from 127.0.0.0/255.0.0.0 ::1/128
- </Directory>
- SSLEngine On
- SSLCertificateFile /etc/apache2/ssl/apache2.pem
- </VirtualHost>
- -----------------------------------------------
- and this is /etc/apache2/sites-available/ssl /etc/apache2/sites-available/default
- 5. /etc/init.d/apache2 force-reload
- 6. a2ensite ssl
- 7. /etc/init.d/apache2 restart
- 8. and i try to visit https://localhost i got error
- Secure Connection Failed
- An error occurred during a connection to localhost.
- SSL received a record that exceeded the maximum permissible length.
- (Error code: ssl_error_rx_record_too_long)
- The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
- Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement