Getting CSR key for SSL Cert

June 6, 2014 4.3k views
Hi I'm have a problem after generating the code -- I followed instruction on -- the issue is the when I click on the link, the file gets downloaded instead of opening in a web browser Please can any one advice what do do?
4 Answers
Generating a SSL certificate wouldn't lead to this. This has to do with how Apache is handling php files. First make sure that the php mod for Apache is enabled:

sudo a2enmod php5
sudo service apache2 restart

If that doesn't resolve the issue, please paste your Apache configuration so we can help debug the problem.
If you are trying to issue an SSL, please read some CA Documentation, they'll provide some code references to do so.

In other hand, if you generate a SSL and have problems when open in http vs https, then you must check your configuration for VirtualHosts and patch it to open correctly with port 443 (Secure).

VirtualHosts, apache conf, other stuffs:
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache.
Thanks guy. I can't run - sudo service apache2 restart anymore... I get the following error
apache2: Syntax error on line 210 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/ into server: /usr/lib/apache2/modules/ cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.!
thanks, problem solved. I most have done something, daft while generating the csr code.
apt-get install libapache2-mod-php5
sudo service apache2 restart
And everything is now up and running, thank for your help @alexandre, I also added port :443 -- thanks
Have another answer? Share your knowledge.