Creating virtual host aliases under Apache

Sometimes you want to create folder alias for your website like this: /images to be mapped to /home/your_account/public_html/images.

To do this, you need to edit Apache httpd.conf file which is located at /etc/httpd/conf

It is clever to put all aliases in one file in the same directory and name them aliases.conf and then only to reference this file from httpd.conf.

You will include aliases.conf in httpd.conf like this:

<IfModule mod_alias.c>
    Include /Applications/MAMP/conf/apache/alias
</IfModule>

You define alias in aliases.conf file like this:

Alias /images /home/your_account/public_html/images
<Directory "/home/your_account/public_html/images">
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Re-keying and Re-issuing MultiSAN SSL certificate in CPanel

I have lost 6 hours of my time when I was trying to add new MultiSAN SSL on server. We already used one and we just added one new SAN placeholder for one subdomain.

Server: CentOS Linux + CPanel

  1. Entered new SAN, using saved CSR and Re-issued the SSL certificate
  2. Went to http://panel.mydomain.com > SSL/TLS Manager and added the new SSL under SSL/TLS Manager > Certificates (CRT) > Generate, view, upload, or delete SSL certificates.
  3. Nothing helped because when I visited https://subdomain.mydomain.com it said that it is using old SSL certificate which has expired.
  4. Tried everything, Re-keying, generating new CSR, few times downloading newly prepared SSL certificate, editing Apache httpd.conf file but nothing help.
    install-ssl-certificate-in-cpanel
  5. After 6 hours I saw the last option: SSL/TLS Manager > Install and Manage SSL for your site (HTTPS) > Manage SSL sites. Uploaded there all three things:
    1. My SSL certificate
    2. Decoded private key
    3. My provider’s SSL certificate
  6. Restart Apache web server

Voila! It finally worked!

What unfriendly user interface where all 4 options are equal and it is not obvious what needs to be done. Or maybe, I am the exception. Tried 3rd option all the time.

Hate these things, but on the other side I learned something new and you will spare some time if you come to the similar problem. Hope, you will find this post quickly!

I definitely wrote this post also for myself, it was not the first time I was searching for some solution and Google listed me my blog post 🙂

 

Follow

Get every new post delivered to your Inbox

Join other followers