13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7 ■ WORKING WITH APACHEso that, on this virtual host (and thus in this part of the directory tree), SSL must be used. This avoidsanyone using an insecure connection to access your secure content.The SSLProtocol directive disables all protocols other than TLS v1.0 and SSL v3.0. SSLCipherSuite isset to use only HIGH and MEDIUM security cipher suites. SHA1 is preferred to MD5 because it isconsidered to be more secure.SSLCertificateFile and SSLCertificateKeyFile should be set to the locations where you put yourcertificate and key files. We’re not using client auth here, so SSLVerifyClient is set to none.■ Note The MSIE section is a workaround for some bugs in some versions of Internet Explorer, which can lead tothe user seeing I/O errors. Some other older versions of Internet Explorer have bugs with particular ciphers that areharder to work around; see http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html#msie if this is a concernfor you.To run the regular server on port 80, add the following section to the config file:NameVirtualHost: *.80DocumentRoot "/local/www/html"# Host-specific directory setup, options, etc# Most of these options are likely to be set outside the VirtualHosts# sections.After you’ve saved the edited configuration file, restart the web server. If you did use a passphrasewhen generating your certificate, you’ll need to enter it when challenged.TestingCreate a basic index.html page wherever the root directory of the SSL part of your web server is located,if you don’t already have content there.Then point your web browser at https://www.example.com. You should see an SSL connectionopened and the page delivered. If you’re using a self-signed certificate, your browser will pop up an alertwarning you that the server’s identity cannot be verified, and you can choose to view and/or accept thecertificate. If using an external certificate, it should all happen without intervention.Now try to access that content with http://. You should get an error message.TroubleshootingIf it’s not working as expected, first check that your server is actually running using ps -a | grep apache.If that doesn’t return anything, try restarting Apache2 (/etc/init.d/apache2 restart), and check forerror messages on the terminal or in /var/log/apache2/error_log.166Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!