Shared web hosting - Chapter 23 . Running a Linux, Apache, MySQL,
Chapter 23 . Running a Linux, Apache, MySQL, and PHP (LAMP) Server 615 The Common Name should match the name that clients will use to access your server. Be sure to get the other details right if you plan to have the CSR signed by a third-party CA. 5. When using a third-party CA, submit the CSR to it and then place the certificate it provides you into /etc/apache/ssl.crt/server.crt (or a different file, as desired). 6. If you don t plan to have your certificate signed, or if you want to test your configuration, generate a self-signed certificate and save it in a file named server.crt: # cd ../ssl.crt/ # openssl req new -x509 -nodes -sha1 -days 365 -key ../ssl.key/server.key -out server.crt Country Name (2 letter code) [AU]:. State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization Name (eg, company) [Internet Widgits Pty Ltd]:TEST USE ONLY Organizational Unit Name (eg, section) []:TEST USE ONLY Common Name (eg, YOUR name) []:secure.example.org Email Address []:dom@example.org Configuring Apache to Support SSL/TLS Once your keys have been generated, you will need to install the mod_ssl Apache module, which adds SSL/TLS support to Apache and then configure it using the appropriate configuration directives. Here s how: 1. SSL and TLS support can be added to Apache by installing the mod_ssl package: # apt-get install libapache-mod-ssl # apache-modconf apache enable mod_ssl Replacing config file /etc/apache/modules.conf with new version 2. Add an SSL-enabled virtual host to your Apache configuration files. Using the earlier virtual host as an example, your configuration will look something like this: Listen *:443
In case you need quality webspace to host and run your web applications, try our personal web hosting services.